public class Iterables
extends java.lang.Object
| Constructor and Description |
|---|
Iterables() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allElementsAreEqual(java.lang.Iterable<?> left,
java.lang.Iterable<?> right) |
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) |
static <T> T |
getFirst(java.lang.Iterable<T> collection,
T defaultValue) |
public static <T> java.lang.Iterable<T> concat(java.lang.Iterable<T>... inputs)
public static <T> java.lang.Iterable<T> flatten(java.lang.Iterable<? extends java.lang.Iterable<T>> inputs)
Iterable into a single Iterable. Note that this pre-caches the values from the outer Iterable, but not the values from the inner one.public static boolean allElementsAreEqual(java.lang.Iterable<?> left,
java.lang.Iterable<?> right)
public static <T> T getFirst(java.lang.Iterable<T> collection,
T defaultValue)
public static <T> T get(java.lang.Iterable<T> iterable,
int position)