public class CollectionUtils
extends java.lang.Object
| Constructor and Description |
|---|
CollectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
concat(java.lang.Iterable<? extends java.lang.Object> arr,
java.lang.String separator)
Builds a string from the
Iterable's elements and appends a separator. |
static <T> java.util.List<T> |
fromArray(T[] arr)
Constructs an
ArrayList from the array. |
static <T> java.util.List<T> |
toList(java.lang.Iterable<T> arr)
Constructs an
ArrayList from the Iterable. |
public static <T> java.util.List<T> fromArray(T[] arr)
ArrayList from the array.public static <T> java.util.List<T> toList(java.lang.Iterable<T> arr)
ArrayList from the Iterable.
Allows for wider usage than its array-only overload.
Honestly, arrays should be Iterables.public static java.lang.String concat(java.lang.Iterable<? extends java.lang.Object> arr,
java.lang.String separator)
Iterable's elements and appends a separator.
If no separator is to be added, use null