E - the type of objects returned by the iteratorpublic abstract static class Iterators.Buffered<E> extends Object implements Iterator<E>
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.| Modifier | Constructor and Description |
|---|---|
protected |
Buffered()
Construct a buffered iterator.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract E |
bufferNext()
Returns the next object for this iterator, or
null
if there are no more objects. |
boolean |
hasNext()
|
E |
next()
Returns the next object for this iterator.
|
void |
remove()
Throws an unsupported operation exception unless overridden by
a subclass.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected Buffered()
protected abstract E bufferNext()
null
if there are no more objects.public boolean hasNext()
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.Copyright © 2019 Alias-i, Inc.. All rights reserved.