util
Class Functional.Zipper<A,B>

java.lang.Object
  extended by util.Functional.Zipper<A,B>
Type Parameters:
A - The first element type.
B - The second element type.
All Implemented Interfaces:
Iterable<Pair<A,B>>
Enclosing class:
Functional

public static final class Functional.Zipper<A,B>
extends Object
implements Iterable<Pair<A,B>>

An iterable over two iterables, pairing them element by element.


Field Summary
 Iterable<A> collA
          The first iterable, yielding the first element of each pair.
 Iterable<B> collB
          The second iterable, yielding the second element of each pair.
 
Constructor Summary
Functional.Zipper(Iterable<A> collA, Iterable<B> collB)
           
 
Method Summary
 Iterator<Pair<A,B>> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collA

public final Iterable<A> collA
The first iterable, yielding the first element of each pair.


collB

public final Iterable<B> collB
The second iterable, yielding the second element of each pair.

Constructor Detail

Functional.Zipper

public Functional.Zipper(Iterable<A> collA,
                         Iterable<B> collB)
Parameters:
collA - The iterable giving the first element of each pair.
collB - The iterable giving the second element of each pair.
Method Detail

iterator

public Iterator<Pair<A,B>> iterator()
Specified by:
iterator in interface Iterable<Pair<A,B>>