public interface ValueIterator
ValueIterator vit = ...; vit.bottomUpInit(); while(vit.hasNext()){ int v = vit.next(); // operate on value v here }OR
ValueIterator vit = ...; vit.topDownInit(); while(vit.hasPrevious()){ int v = vit.previous(); // operate on value v here }
Modifier and Type | Method and Description |
---|---|
void |
bottomUpInit() |
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 next value.
|
void |
topDownInit() |
void bottomUpInit()
void topDownInit()
boolean hasNext()
boolean hasPrevious()
int next()
int previous()
Copyright © 2015. All rights reserved.