Class ConcatenatingIterable<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>

    public class ConcatenatingIterable<E>
    extends java.lang.Object
    implements java.lang.Iterable<E>
    An iterable over arbitrary objects, that concatenates the objects returned by two supplied iterables.
    • Constructor Summary

      Constructors 
      Constructor Description
      ConcatenatingIterable​(java.lang.Iterable<? extends E> first, java.lang.Iterable<? extends E> second)
      Create an iterable that concatenates the results of two supplied iterables.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<E> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • ConcatenatingIterable

        public ConcatenatingIterable​(java.lang.Iterable<? extends E> first,
                                     java.lang.Iterable<? extends E> second)
        Create an iterable that concatenates the results of two supplied iterables.
        Parameters:
        first - the first iterable
        second - the second iterable
    • Method Detail

      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<E>