Class DisposableValueBoundIterator

    • Constructor Detail

      • DisposableValueBoundIterator

        public DisposableValueBoundIterator​(IntVar var)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from interface: ValueIterator
        Returns true if the iteration has more values. (In other words, returns true if next would return valid value.)
         ValueIterator vit = ...;
         vit.bottomUpInit();
         while(vit.hasNext()){
            int v = vit.next();
            // operate on value v here
         }
        OR
        Returns:
        true if the getIterator has more values.
      • hasPrevious

        public boolean hasPrevious()
        Description copied from interface: ValueIterator
        Returns true if the iteration has more ranges. (In other words, returns true if previous would return a valid value.)
         ValueIterator vit = ...;
         vit.topDownInit();
         while(vit.hasPrevious()){
            int v = vit.previous();
            // operate on value v here
         }
        Returns:
        true if the getIterator has more values.
      • next

        public int next()
        Description copied from interface: ValueIterator
        Compute and return the next value.
         ValueIterator vit = ...;
         vit.bottomUpInit();
         while(vit.hasNext()){
            int v = vit.next();
            // operate on value v here
         }
        OR
        Returns:
        the next element in the iteration.
      • previous

        public int previous()
        Description copied from interface: ValueIterator
        Compute and return the previous value.
         ValueIterator vit = ...;
         vit.topDownInit();
         while(vit.hasPrevious()){
            int v = vit.previous();
            // operate on value v here
         }
        Returns:
        the previous element in the iteration.