java.lang.Object
com.aoapps.collections.AoCollections.PeekIterator<E>
- All Implemented Interfaces:
Iterator<E>
- Enclosing class:
AoCollections
Allows peeking the first element of iteration. Does not support remove.
Does not support null elements.
-
Method Details
-
hasNext
public boolean hasNext() -
next
- Specified by:
next
in interfaceIterator<E>
- Throws:
NoSuchElementException
-
peek
Gets the next value without removing it.- Throws:
NoSuchElementException
- if no next value
-