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 levelIterable
into a singleIterable
.static <T> T
get(java.lang.Iterable<T> iterable, int position)
static <T> int
indexOf(java.lang.Iterable<T> iterable, java.util.function.Predicate<T> predicate)
static long
size(java.lang.Iterable<?> iterable)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Iterables
public Iterables()
-
-
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 levelIterable
into a singleIterable
. Note that this pre-caches the values from the outerIterable
, but not the values from the inner one. -
get
public static <T> T get(java.lang.Iterable<T> iterable, int position) -
indexOf
public static <T> int indexOf(java.lang.Iterable<T> iterable, java.util.function.Predicate<T> predicate) -
size
public static long size(java.lang.Iterable<?> iterable)
-