public abstract class DisposableValueIterator extends Disposable implements ValueIterator
| Constructor and Description |
|---|
DisposableValueIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
bottomUpInit()
Prepare iteration from smallest value to highest value (using
ValueIterator.hasNext() / ValueIterator.next())
ValueIterator vit = ...;
vit.bottomUpInit();
while(vit.hasNext()){
int v = vit.next();
// operate on value v here
}
OR
|
void |
topDownInit()
Prepare iteration from highest value to smallest value (using
ValueIterator.hasPrevious() / ValueIterator.previous())
ValueIterator vit = ...;
vit.topDownInit();
while(vit.hasPrevious()){
int v = vit.previous();
// operate on value v here
} |
dispose, init, isNotReusable, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasNext, hasPrevious, next, previouspublic void bottomUpInit()
ValueIteratorValueIterator.hasNext() / ValueIterator.next())
ValueIterator vit = ...;
vit.bottomUpInit();
while(vit.hasNext()){
int v = vit.next();
// operate on value v here
}
OR
bottomUpInit in interface ValueIteratorpublic void topDownInit()
ValueIteratorValueIterator.hasPrevious() / ValueIterator.previous())
ValueIterator vit = ...;
vit.topDownInit();
while(vit.hasPrevious()){
int v = vit.previous();
// operate on value v here
}topDownInit in interface ValueIteratorCopyright © 2018. All rights reserved.