Class Pair.FirstAndIterator<E>

  • Type Parameters:
    E - Element type
    All Implemented Interfaces:
    Iterator<Pair<E,​E>>
    Enclosing class:
    Pair<T1,​T2>

    private static class Pair.FirstAndIterator<E>
    extends Object
    implements Iterator<Pair<E,​E>>
    Iterator that returns the first element of a collection paired with every other element.
    • Field Detail

      • iterator

        private final Iterator<E> iterator
      • first

        private final E first
    • Constructor Detail

      • FirstAndIterator

        FirstAndIterator​(Iterator<E> iterator,
                         E first)