Class 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
    • 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.