public class DisposableValueBoundIterator extends DisposableValueIterator
Constructor and Description |
---|
DisposableValueBoundIterator(IntVar var) |
Modifier and Type | Method and Description |
---|---|
void |
bottomUpInit()
Prepare iteration from smallest value to highest value (using
ValueIterator.hasNext() / ValueIterator.next() ) |
boolean |
hasNext()
Returns true if the iteration has more values.
|
boolean |
hasPrevious()
Returns true if the iteration has more ranges.
|
int |
next()
Compute and return the next value.
|
int |
previous()
Compute and return the previous value.
|
void |
topDownInit()
Prepare iteration from highest value to smallest value (using
ValueIterator.hasPrevious() / ValueIterator.previous() ) |
dispose, init, isNotReusable, remove
public DisposableValueBoundIterator(IntVar var)
public void bottomUpInit()
ValueIterator
ValueIterator.hasNext()
/ ValueIterator.next()
)
ValueIterator vit = ...; vit.bottomUpInit(); while(vit.hasNext()){ int v = vit.next(); // operate on value v here }OR
bottomUpInit
in interface ValueIterator
bottomUpInit
in class DisposableValueIterator
public void topDownInit()
ValueIterator
ValueIterator.hasPrevious()
/ ValueIterator.previous()
)
ValueIterator vit = ...; vit.topDownInit(); while(vit.hasPrevious()){ int v = vit.previous(); // operate on value v here }
topDownInit
in interface ValueIterator
topDownInit
in class DisposableValueIterator
public boolean hasNext()
ValueIterator
ValueIterator vit = ...; vit.bottomUpInit(); while(vit.hasNext()){ int v = vit.next(); // operate on value v here }OR
public boolean hasPrevious()
ValueIterator
ValueIterator vit = ...; vit.topDownInit(); while(vit.hasPrevious()){ int v = vit.previous(); // operate on value v here }
public int next()
ValueIterator
ValueIterator vit = ...; vit.bottomUpInit(); while(vit.hasNext()){ int v = vit.next(); // operate on value v here }OR
public int previous()
ValueIterator
ValueIterator vit = ...; vit.topDownInit(); while(vit.hasPrevious()){ int v = vit.previous(); // operate on value v here }
Copyright © 2018. All rights reserved.