Class IterableUtils
- java.lang.Object
-
- org.craftercms.commons.collections.IterableUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> int
count(Iterable<T> iterable)
Returns the number of elements the iterable contains.static <T> List<T>
toList(Iterable<T> iterable)
Creates a new list from the iterable elements.
-
-
-
Method Detail
-
toList
public static <T> List<T> toList(Iterable<T> iterable)
Creates a new list from the iterable elements.- Parameters:
iterable
- the iterable- Returns:
- a list with the iterable elements
-
count
public static <T> int count(Iterable<T> iterable)
Returns the number of elements the iterable contains.- Parameters:
iterable
- the iterable- Returns:
- the element count of the iterable
-
-