public abstract class AbstractLazyIterator<T> extends Object implements Iterator<T>
AbstractLazyIterator
provides basic iteration methods for a lazy loading iterator that does not support
remove. Implementing classes only need to implement the getNext()
method which must return the next item
in the iteration or null
if the iteration as reached its end.Modifier | Constructor and Description |
---|---|
protected |
AbstractLazyIterator() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
getNext()
Returns the next element of this iteration or
null if the iteration has finished. |
boolean |
hasNext() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected abstract T getNext()
null
if the iteration has finished.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.