Interface PeekingIterator<E extends @Nullable Object>

All Superinterfaces:
Iterator<E>

@DoNotMock("Use Iterators.peekingIterator") @GwtCompatible public interface PeekingIterator<E extends @Nullable Object> extends Iterator<E>
An iterator that supports a one-element lookahead while iterating.

See the Guava User Guide article on PeekingIterator.

Since:
2.0
Author:
Mick Killianey
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the next element in the iteration, without advancing the iteration.
    void

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext