|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- public interface PeekableIterator<T>
provides an Iterator
with peeking functionality. The
PeekableIterator
makes it possible to make a single element
Iterator lookahead.
peek()
Method Summary | |
---|---|
boolean |
hasNext()
|
T |
next()
|
T |
peek()
Peeks the very next element. |
void |
remove()
|
Method Detail |
---|
boolean hasNext()
hasNext
in interface Iterator<T>
T next()
next
in interface Iterator<T>
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();
void remove()
remove
in interface Iterator<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |