public class Iterables
extends java.lang.Object
Iterable
s.Constructor and Description |
---|
Iterables() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object[] |
toArray(java.lang.Iterable<?> iterable)
Convert an Iterable into an array.
|
static <T> T[] |
toArray(java.lang.Iterable<T> iterable,
java.lang.Class<?> type)
Convert an Iterable into an array.
|
static <T> java.util.List<T> |
toList(java.lang.Iterable<T> iterable)
Convert an Iterable into a list.
|
static java.lang.String |
toString(java.lang.Iterable<?> iterable)
Convert an {link java.lang.Iterable} to a String.
|
public static <T> java.util.List<T> toList(java.lang.Iterable<T> iterable)
iterable
- The iterable.public static java.lang.Object[] toArray(java.lang.Iterable<?> iterable)
iterable
- The iterable.public static <T> T[] toArray(java.lang.Iterable<T> iterable, java.lang.Class<?> type)
iterable
- The iterable.type
- The component type of the array to create.public static java.lang.String toString(java.lang.Iterable<?> iterable)
iterable
- The Iterable.