public static class PeekIterator.SimplePeekIterator<T> extends PeekIterator<T>
PeekIterator.ElementaryPeekIterator<T>, PeekIterator.SimplePeekIterator<T>| Modifier and Type | Field and Description |
|---|---|
Iterator<T> |
iterator
Wrapped iterator
|
closed, EMPTY, fetchedNextValue, next| Constructor and Description |
|---|
SimplePeekIterator(Iterable<T> i)
Constructs a PeekIterator from an Iteratable (e.g.
|
SimplePeekIterator(Iterator<T> i)
Constructs a PeekIterator from another Iterator
|
SimplePeekIterator(T... elements)
Constructs a PeekIterator for a given list of elements
|
SimplePeekIterator(T element)
Constructs a PeekIterator for a given list of elements
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
internalNext()
Returns the next or NULL if no next element is available.
|
void |
remove()
Removes the current element, if supported by the underlying iterator
|
String |
toString() |
asList, asList, asSet, asSet, asSet, close, emptyIterator, hasNext, internalSilentNext, iterator, list, list, main, next, nextOrNull, numElements, numElements, peek, toString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingforEach, spliteratorpublic SimplePeekIterator(Iterator<T> i)
public SimplePeekIterator(Iterable<T> i)
public SimplePeekIterator(T... elements)
public SimplePeekIterator(T element)
protected T internalNext() throws Exception
internalNext in class PeekIterator<T>Exceptionpublic void remove()
public String toString()
toString in class PeekIterator<T>Copyright © 2018. All rights reserved.