Class Joined<T>

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

    public final class Joined<T>
    extends java.lang.Object
    implements java.lang.Iterable<T>
    An Iterable which joins other Iterables by iterating the values of them one after another.

    Note: other frameworks call this operation, "flatten". While this is technically appropriate, it often doesn't really express the intent very well.

    • Constructor Summary

      Constructors 
      Constructor Description
      Joined​(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables)  
      Joined​(java.lang.Iterable<? extends T>... iterables)  
      Joined​(java.lang.Iterable<? extends T> iterable, T... appendedValues)  
      Joined​(Optional<? extends java.lang.Iterable<? extends T>>... iterables)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<T> 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

      • Joined

        @SafeVarargs
        public Joined​(java.lang.Iterable<? extends T> iterable,
                      T... appendedValues)
      • Joined

        @SafeVarargs
        public Joined​(Optional<? extends java.lang.Iterable<? extends T>>... iterables)
      • Joined

        @SafeVarargs
        public Joined​(java.lang.Iterable<? extends T>... iterables)
      • Joined

        public Joined​(java.lang.Iterable<? extends java.lang.Iterable<? extends T>> iterables)
    • Method Detail

      • iterator

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