public final class Peekerators extends Object
Peekerators.| Modifier and Type | Method and Description | 
|---|---|
| static <E> Peekerator<E> | from(Iterator<E> delegate)Wraps a given  Iteratoras aPeekerator. | 
| static <E> Peekerator<E> | from(ListIterator<E> delegate)Wraps a given  ListIteratoras aPeekerator. | 
public static <E> Peekerator<E> from(Iterator<E> delegate)
Iterator as a Peekerator. That peekerator implements the Peekerator.peek()
 operation by reading ahead (at most) one element from the underlying iterator.public static <E> Peekerator<E> from(ListIterator<E> delegate)
ListIterator as a Peekerator. That peekerator implements the Peekerator.peek() operation by calling ListIterator.next() and immediately ListIterator.previous().
 
   This implementation may perform slightly better than from(Iterator).
 
Copyright © 2018 Arno Unkrig. All rights reserved.