Class ZipIterable<X,​Y>

    • Field Detail

      • xs

        private final java.lang.Iterable<X> xs
      • ys

        private final java.lang.Iterable<Y> ys
    • Constructor Detail

      • ZipIterable

        public ZipIterable​(java.lang.Iterable<X> xs,
                           java.lang.Iterable<Y> ys)
    • Method Detail

      • iterator

        public java.util.Iterator<Pair<X,​Y>> iterator()
      • each

        public void each​(Procedure<? super Pair<X,​Y>> procedure)
        Description copied from interface: RichIterable
        The procedure is executed for each element in the iterable.

        Example using a Java 8 lambda expression:

         people.each(person -> LOGGER.info(person.getName()));
         

        Example using an anonymous inner class:

         people.each(new Procedure<Person>()
         {
             public void value(Person 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).
        See Also:
        InternalIterable.forEach(Procedure), Iterable.forEach(java.util.function.Consumer)