Package cn.boboweike.carrot.utils
Class CollectionUtils
- java.lang.Object
-
- cn.boboweike.carrot.utils.CollectionUtils
-
public class CollectionUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> ArrayList<T>asArrayList(Collection<T> existingCollection)static <T> List<T>asList(T[] array, T... params)static <T> Set<T>asSet(Collection<T>... existingCollections)static <T> Set<T>asSet(T... items)static <T> booleanisNotNullOrEmpty(Collection<T> collection)static <T> booleanisNotNullOrEmpty(T[] someArray)static <T> booleanisNullOrEmpty(Collection<T> collection)static <T> booleanisNullOrEmpty(T[] someArray)static <K,V>
Map<K,V>mapOf(K key1, V value1)static <K,V>
Map<K,V>mapOf(K key1, V value1, K key2, V value2)
-
-
-
Method Detail
-
isNotNullOrEmpty
public static <T> boolean isNotNullOrEmpty(Collection<T> collection)
-
isNullOrEmpty
public static <T> boolean isNullOrEmpty(Collection<T> collection)
-
isNotNullOrEmpty
public static <T> boolean isNotNullOrEmpty(T[] someArray)
-
isNullOrEmpty
public static <T> boolean isNullOrEmpty(T[] someArray)
-
asList
public static <T> List<T> asList(T[] array, T... params)
-
asArrayList
public static <T> ArrayList<T> asArrayList(Collection<T> existingCollection)
-
asSet
public static <T> Set<T> asSet(T... items)
-
asSet
public static <T> Set<T> asSet(Collection<T>... existingCollections)
-
mapOf
public static <K,V> Map<K,V> mapOf(K key1, V value1)
-
mapOf
public static <K,V> Map<K,V> mapOf(K key1, V value1, K key2, V value2)
-
-