public final class CollectionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
addAll(Collection<T> c,
T[] items) |
static <T> void |
addArray(Collection<T> c,
T[] array)
Add all items in an array to a set.
|
static <T> T |
getSingleton(Collection<T> s) |
static boolean |
isAllStrings(Collection<?> c) |
static <T> T[] |
toArray(Collection<? extends T> c,
Class<T> elementClass) |
static <T> String |
toString(Collection<T> c,
String delim) |
static <T> String[] |
toStringArray(Collection<T> c) |
static <T> List<String> |
toStringList(Collection<T> c) |
public static <T> void addAll(Collection<T> c, T[] items)
public static <T> String toString(Collection<T> c, String delim)
public static <T> String[] toStringArray(Collection<T> c)
public static <T> List<String> toStringList(Collection<T> c)
public static <T> T getSingleton(Collection<T> s)
public static <T> void addArray(Collection<T> c, T[] array)
public static <T> T[] toArray(Collection<? extends T> c, Class<T> elementClass)
c - the CollectionelementClass - the type of the element, must be non-primitivepublic static boolean isAllStrings(Collection<?> c)
Copyright © 2017. All rights reserved.