Class Zip<T extends org.jooq.lambda.tuple.Tuple>

java.lang.Object
org.nasengolem.util.zip.Zip<T>
Type Parameters:
T - the type of elements returned by this iterator.
All Implemented Interfaces:
Iterable<T>, Iterator<T>
Direct Known Subclasses:
Zip2, Zip3

public abstract class Zip<T extends org.jooq.lambda.tuple.Tuple> extends Object implements Iterator<T>, Iterable<T>
Abstract base class for implementing zipping functionality over multiple iterables. This class implements both Iterator and Iterable, allowing instances to be used in enhanced for-loops and to provide their own iteration behavior.

The term "zipping" refers to combining multiple iterables into a single iterable of tuples. Since Java does not natively support tuples or pattern matching, this implementation uses tuples from the org.jooq.lambda.tuple package to fill that gap. This is inspired by the zip function in Python. For more information on the Python equivalent, see Python zip documentation.

Author:
Paul Steinbach