Package generic.util

Interface PeekableIterator<T>

Type Parameters:
T - The type of this iterator.
All Superinterfaces:
Iterator<T>
All Known Implementing Classes:
WrappingPeekableIterator

public interface PeekableIterator<T> extends Iterator<T>
An iterator that allows you to peek at the next item on the iterator.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the item that would be returned by calling Iterator.next(), but does not increment the iterator as next would.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove