Top Description Fields Constructors Methods
org.eclipse.collections.impl.lazy

public Class ZipIterable<X, Y>

extends AbstractLazyIterable<Pair<X, Y>>
Class Inheritance
Imports
java.util.Iterator, org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.lazy.iterator.ZipIterator, org.eclipse.collections.impl.utility.internal.IterableIterate

A ZipIterable is an iterable that transforms a source iterable on a condition as it iterates.

Field Summary

Modifier and TypeField and Description
private final Iterable<X>
private final Iterable<Y>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
each(Procedure<? super Pair<X, Y>> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public Iterator<Pair<X, Y>>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Inherited from org.eclipse.collections.impl.lazy.AbstractLazyIterable:
asLazychunkcollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIfcollectIntcollectLongcollectShortcollectWithconcatenatedistinctdropdropWhileflatCollectgetFirstgetLastgetOnlygroupBygroupByEachgroupByUniqueKeyintoisEmptymaxByOptionalmaxOptionalmaxOptionalminByOptionalminOptionalminOptionalpartitionpartitionWithrejectrejectWithselectselectInstancesOfselectWithsizesumByDoublesumByFloatsumByIntsumByLongtaketakeWhiletaptoStackzipzipWithIndex

Field Detail

xsback to summary
private final Iterable<X> xs
ysback to summary
private final Iterable<Y> ys

Constructor Detail

ZipIterableback to summary
public ZipIterable(Iterable<X> xs, Iterable<Y> ys)

Method Detail

eachback to summary
public void each(Procedure<? super Pair<X, Y>> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

Doc from org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

Example using a Java 8 lambda expression:

people.each(person -> LOGGER.info(person.getName()));
This method is a variant of InternalIterable#forEach(Procedure) that has a signature conflict with Iterable#forEach(java.util.function.Consumer).
Annotations
@Override
iteratorback to summary
public Iterator<Pair<X, Y>> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override