- java.lang.Object
-
- org.chocosolver.util.iterators.Disposable
-
- org.chocosolver.util.iterators.DisposableValueIterator
-
- All Implemented Interfaces:
ValueIterator
- Direct Known Subclasses:
DisposableValueBoundIterator
public abstract class DisposableValueIterator extends Disposable implements ValueIterator
An disposable values iterator for values.- Since:
- 05/10/11
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description DisposableValueIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bottomUpInit()
Prepare iteration from smallest value to highest value (usingValueIterator.hasNext()
/ValueIterator.next()
)void
topDownInit()
Prepare iteration from highest value to smallest value (usingValueIterator.hasPrevious()
/ValueIterator.previous()
)-
Methods inherited from class org.chocosolver.util.iterators.Disposable
dispose, init, isNotReusable, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.chocosolver.util.iterators.ValueIterator
hasNext, hasPrevious, next, previous
-
-
-
-
Method Detail
-
bottomUpInit
public void bottomUpInit()
Description copied from interface:ValueIterator
Prepare iteration from smallest value to highest value (usingValueIterator.hasNext()
/ValueIterator.next()
)ValueIterator vit = ...; vit.bottomUpInit(); while(vit.hasNext()){ int v = vit.next(); // operate on value v here }
OR- Specified by:
bottomUpInit
in interfaceValueIterator
-
topDownInit
public void topDownInit()
Description copied from interface:ValueIterator
Prepare iteration from highest value to smallest value (usingValueIterator.hasPrevious()
/ValueIterator.previous()
)ValueIterator vit = ...; vit.topDownInit(); while(vit.hasPrevious()){ int v = vit.previous(); // operate on value v here }
- Specified by:
topDownInit
in interfaceValueIterator
-
-