public class Iterables extends Object
Constructor and Description |
---|
Iterables() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
firstOf(Iterable<T> iterable)
Returns first element of provided iterable or fails fast when iterable is empty.
|
static <T> Iterable<T> |
toIterable(Enumeration<T> in)
Converts enumeration into iterable
|
public static <T> Iterable<T> toIterable(Enumeration<T> in)
public static <T> T firstOf(Iterable<T> iterable)
iterable
- non-empty iterableIllegalArgumentException
- when supplied iterable is emptyCopyright © 2020. All rights reserved.