Package org.chocosolver.util.iterators
Class DisposableRangeBoundIterator
- java.lang.Object
-
- org.chocosolver.util.iterators.Disposable
-
- org.chocosolver.util.iterators.DisposableRangeIterator
-
- org.chocosolver.util.iterators.DisposableRangeBoundIterator
-
- All Implemented Interfaces:
RangeIterator
public class DisposableRangeBoundIterator extends DisposableRangeIterator
- Since:
- 05/10/11
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description DisposableRangeBoundIterator(IntVar var)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbottomUpInit()booleanhasNext()Returns true if the iteration has more ranges.booleanhasPrevious()Returns true if the iteration has more ranges.intmax()Return the upper bound of the current range (inclusive)intmin()Return the lower bound of the current range (inclusive)voidnext()Compute the next range.voidprevious()Compute the previous range.voidtopDownInit()-
Methods inherited from class org.chocosolver.util.iterators.Disposable
dispose, init, isNotReusable, remove
-
-
-
-
Constructor Detail
-
DisposableRangeBoundIterator
public DisposableRangeBoundIterator(IntVar var)
-
-
Method Detail
-
bottomUpInit
public void bottomUpInit()
- Specified by:
bottomUpInitin interfaceRangeIterator- Overrides:
bottomUpInitin classDisposableRangeIterator
-
topDownInit
public void topDownInit()
- Specified by:
topDownInitin interfaceRangeIterator- Overrides:
topDownInitin classDisposableRangeIterator
-
hasNext
public boolean hasNext()
Description copied from interface:RangeIteratorReturns true if the iteration has more ranges. (In other words, returns true if next would return a valid range.)- Returns:
- true if the getIterator has more ranges.
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:RangeIteratorReturns true if the iteration has more ranges. (In other words, returns true if previous would return a valid range.)- Returns:
- true if the getIterator has more ranges.
-
next
public void next()
Description copied from interface:RangeIteratorCompute the next range.
-
previous
public void previous()
Description copied from interface:RangeIteratorCompute the previous range.
-
min
public int min()
Description copied from interface:RangeIteratorReturn the lower bound of the current range (inclusive)- Returns:
- lower bound of the current range
-
max
public int max()
Description copied from interface:RangeIteratorReturn the upper bound of the current range (inclusive)- Returns:
- upper bound of the current range
-
-