|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.util.Iterators.Buffered<E>
public abstract static class Iterators.Buffered<E>
An Iterators.Buffered uses a single method to return
objects, buffering the result and returning it as the next element
if it is non-null. This class does not support
null return values for next(). The remove() operation is unsupported, but may be overridden.
| Constructor Summary | |
|---|---|
protected |
Iterators.Buffered()
Construct a buffered iterator. |
| Method Summary | |
|---|---|
protected abstract E |
bufferNext()
Returns the next object for this iterator, or null
if there are no more objects. |
boolean |
hasNext()
Returns true if the next call to next()
will return a non-null value. |
E |
next()
Returns the next object for this iterator. |
void |
remove()
Throws an unsupported operation exception unless overridden by a subclass. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Iterators.Buffered()
| Method Detail |
|---|
protected abstract E bufferNext()
null
if there are no more objects.
public boolean hasNext()
true if the next call to next()
will return a non-null value.
hasNext in interface Iterator<E>true if the next call to next()
will return a non-null value.public E next()
next in interface Iterator<E>NoSuchElementException - If there are no more elements.public void remove()
remove in interface Iterator<E>UnsupportedOperationException - Always.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||