Package org.cactoos.iterable
Class Matched<X>
- java.lang.Object
-
- org.cactoos.iterable.IterableEnvelope<X>
-
- org.cactoos.iterable.Matched<X>
-
- Type Parameters:
X
- Type of item.
- All Implemented Interfaces:
Iterable<X>
public final class Matched<X> extends IterableEnvelope<X>
Matched iterable. Iterates over 2 iterables at the same time and verify that elements with the same position has correlation by the function. The function might be equals, endsWith, greaterThen, nonNull, empty, negative, positive, etc.- Since:
- 0.39
-
-
Method Summary
-
Methods inherited from class org.cactoos.iterable.IterableEnvelope
equals, hashCode, iterator, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Matched
public Matched(Iterable<? extends X> fst, Iterable<? extends X> snd)
Ctor.- Parameters:
fst
- The first part of duplex iterator.snd
- The second part of duplex iterator.
-
Matched
public Matched(BiFunc<? super X,? super Y,Boolean> fnc, Iterable<? extends X> fst, Iterable<? extends Y> snd)
Ctor.- Type Parameters:
Y
- Type of item in snd.- Parameters:
fnc
- The function to detect the correlation between elements.fst
- The first part of duplex iterator.snd
- The second part of duplex iterator.
-
-