Class Iterables

java.lang.Object
org.elasticsearch.common.util.iterable.Iterables

public class Iterables
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Iterables()  
  • Method Summary

    Modifier and Type Method Description
    static <T> java.lang.Iterable<T> concat​(java.lang.Iterable<T>... inputs)  
    static <T> java.lang.Iterable<T> flatten​(java.lang.Iterable<? extends java.lang.Iterable<T>> inputs)
    Flattens the two level Iterable into a single Iterable.
    static <T> T get​(java.lang.Iterable<T> iterable, int position)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • concat

      public static <T> java.lang.Iterable<T> concat​(java.lang.Iterable<T>... inputs)
    • flatten

      public static <T> java.lang.Iterable<T> flatten​(java.lang.Iterable<? extends java.lang.Iterable<T>> inputs)
      Flattens the two level Iterable into a single Iterable. Note that this pre-caches the values from the outer Iterable, but not the values from the inner one.
    • get

      public static <T> T get​(java.lang.Iterable<T> iterable, int position)