public class CollectionUtil extends java.lang.Object
Constructor and Description |
---|
CollectionUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
addUniq(java.util.List<T> list,
T t) |
static <T> boolean |
addUniq(java.util.List<T> list,
T t,
boolean addIfNull) |
static <T> java.util.ArrayList<T> |
asArrayList(T... a) |
static <T> java.util.List<T> |
asList(T... a) |
static <T> java.util.ArrayList<T> |
createArrayList(T t) |
static <T> java.util.ArrayList<T> |
createArrayList(T t,
boolean addIfNull) |
static <T> boolean |
equals(java.util.Collection<T> c1,
java.util.Collection<T> c2)
Return
true if both collections contains the same elements. |
public CollectionUtil()
public static <T> java.util.ArrayList<T> asArrayList(T... a)
public static <T> java.util.List<T> asList(T... a)
public static <T> java.util.ArrayList<T> createArrayList(T t, boolean addIfNull)
public static <T> java.util.ArrayList<T> createArrayList(T t)
public static <T> boolean addUniq(java.util.List<T> list, T t, boolean addIfNull)
public static <T> boolean addUniq(java.util.List<T> list, T t)
public static <T> boolean equals(java.util.Collection<T> c1, java.util.Collection<T> c2)
true
if both collections contains the same elements.