- java.lang.Object
-
- com.aoapps.collections.AoCollections.PeekIterator<E>
-
- All Implemented Interfaces:
Iterator<E>
- Enclosing class:
- AoCollections
public static class AoCollections.PeekIterator<E> extends Object implements Iterator<E>
Allows peeking the first element of iteration. Does not support remove. Does not support null elements.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Enext()Epeek()Gets the next value without removing it.voidremove()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
peek
public E peek()
Gets the next value without removing it.- Throws:
NoSuchElementException- if no next value
-
-