Package org.chocosolver.util.iterators
Class DisposableValueIterator
- 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 voidbottomUpInit()Prepare iteration from smallest value to highest value (usingValueIterator.hasNext()/ValueIterator.next())voidtopDownInit()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:ValueIteratorPrepare 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:
bottomUpInitin interfaceValueIterator
-
topDownInit
public void topDownInit()
Description copied from interface:ValueIteratorPrepare 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:
topDownInitin interfaceValueIterator
-
-