public abstract class CollectionKit extends Object
| 构造器和说明 |
|---|
CollectionKit() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T[] |
concat(T[] a,
T[] b)
merge array
|
static boolean |
isEmpty(Collection<?> collection)
Return
true if the supplied Collection is null or empty. |
static <K,V> boolean |
isEmpty(Map<K,V> map)
return map is empty
|
static <T> boolean |
isEmpty(T[] arr)
return array is empty
|
static <T> ArrayList<T> |
newArrayList()
new ArrayList
|
static <T> ArrayList<T> |
newArrayList(int size)
new ArrayList and initialCapacity
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap()
new concurrentHashMap
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap(int size)
new concurrentHashMap and initialCapacity
|
static <K,V> HashMap<K,V> |
newHashMap()
new HashMap
|
static <K,V> HashMap<K,V> |
newHashMap(int size)
new HashMap and initialCapacity
|
static <T> HashSet<T> |
newHashSet()
new HashSet
|
static <T> HashSet<T> |
newHashSet(int size)
new HashSet and initialCapacity
|
static <T> TreeSet<T> |
newTreeSet()
new TreeSet
|
static <K,V> Map<K,V> |
sortMap(Map<K,V> map,
Comparator<Map.Entry<K,V>> compator)
map sort
|
public static <K,V> HashMap<K,V> newHashMap()
public static <K,V> HashMap<K,V> newHashMap(int size)
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap()
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(int size)
public static <T> ArrayList<T> newArrayList()
public static <T> ArrayList<T> newArrayList(int size)
public static <T> HashSet<T> newHashSet()
public static <T> HashSet<T> newHashSet(int size)
public static <T> TreeSet<T> newTreeSet()
public static <K,V> Map<K,V> sortMap(Map<K,V> map, Comparator<Map.Entry<K,V>> compator)
public static <K,V> boolean isEmpty(Map<K,V> map)
public static <T> boolean isEmpty(T[] arr)
public static <T> T[] concat(T[] a,
T[] b)
a - b - public static boolean isEmpty(Collection<?> collection)
true if the supplied Collection is null or empty.
Otherwise, return false.collection - the Collection to checkCopyright © 2015. All rights reserved.