Class Paired<Left,​Right>

  • All Implemented Interfaces:
    java.lang.Iterable<Pair<Left,​Right>>

    public final class Paired<Left,​Right>
    extends DelegatingIterable<Pair<Left,​Right>>
    An Iterable combining the elements of two given Iterables into an Iterable of Pairs.

    This iterates as many elements as the shorter of both Iterables.

    Example

     Paired(["a", "b", "c"], ["u", "v", "w", "x"]) ->
     [
       ("a", "u"),
       ("b", "v"),
       ("c", "w")
     ]
     
    • Constructor Summary

      Constructors 
      Constructor Description
      Paired​(java.lang.Iterable<Left> leftIterable, java.lang.Iterable<Right> rightIterable)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Paired

        public Paired​(java.lang.Iterable<Left> leftIterable,
                      java.lang.Iterable<Right> rightIterable)