Interface LinkedDeque.PeekingIterator<E>
- All Superinterfaces:
Iterator<E>
- All Known Implementing Classes:
AbstractLinkedDeque.AbstractLinkedIterator
- Enclosing interface:
LinkedDeque<E>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> LinkedDeque.PeekingIterator
<E> comparing
(LinkedDeque.PeekingIterator<E> first, LinkedDeque.PeekingIterator<E> second, Comparator<E> comparator) Returns an iterator that selects the greater element from the backing iterators.static <E> LinkedDeque.PeekingIterator
<E> concat
(LinkedDeque.PeekingIterator<E> first, LinkedDeque.PeekingIterator<E> second) Returns an iterator that returns the first iteration followed by the second iteration.@Nullable E
peek()
Returns the next element in the iteration, without advancing the iteration.Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
peek
@Nullable E peek()Returns the next element in the iteration, without advancing the iteration. -
concat
static <E> LinkedDeque.PeekingIterator<E> concat(LinkedDeque.PeekingIterator<E> first, LinkedDeque.PeekingIterator<E> second) Returns an iterator that returns the first iteration followed by the second iteration. -
comparing
static <E> LinkedDeque.PeekingIterator<E> comparing(LinkedDeque.PeekingIterator<E> first, LinkedDeque.PeekingIterator<E> second, Comparator<E> comparator) Returns an iterator that selects the greater element from the backing iterators.
-