public class Iterables
extends java.lang.Object
| Constructor and Description |
|---|
Iterables() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
firstOf(java.lang.Iterable<T> iterable)
Returns first element of provided iterable or fails fast when iterable is empty.
|
static <T> java.lang.Iterable<T> |
toIterable(java.util.Enumeration<T> in)
Converts enumeration into iterable
|
public static <T> java.lang.Iterable<T> toIterable(java.util.Enumeration<T> in)
public static <T> T firstOf(java.lang.Iterable<T> iterable)
iterable - non-empty iterablejava.lang.IllegalArgumentException - when supplied iterable is empty