public class Iterables
extends java.lang.Object
| Constructor and Description |
|---|
Iterables() |
| Modifier and Type | Method and Description |
|---|---|
static int |
size(java.lang.Iterable<?> iterable)
Returns the number of elements in
iterable. |
static <T> T[] |
toArray(java.lang.Iterable<? extends T> iterable,
java.lang.Class<T> type)
Copies an iterable's elements into an array.
|
public static int size(java.lang.Iterable<?> iterable)
iterable.iterable - The IterableIterable sizepublic static <T> T[] toArray(java.lang.Iterable<? extends T> iterable,
java.lang.Class<T> type)
iterable - the iterable to copytype - the type of the elements