T
- public interface PeekableIterator<T> extends Iterator<T>
Iterator
with peeking functionality. The
PeekableIterator
makes it possible to make a single element
Iterator lookahead.peek()
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
T |
peek()
Peeks the very next element.
|
void |
remove() |
forEachRemaining
T peek()
Iterator.next()
would
return, with the addition that it will not be consumed directly. The
implementation ensures that the following statement will return true:
peekableIter.peek() == peekableIter.next();
Copyright © 2024 levigo holding gmbh. All rights reserved.