public final class CollectionKit extends Object
构造器和说明 |
---|
CollectionKit() |
限定符和类型 | 方法和说明 |
---|---|
static <T> boolean |
isEmpty(Collection<T> collection)
Determines whether an collection is empty
|
static <T> boolean |
isEmpty(T[] array)
Determines whether an array is empty
|
static <T> boolean |
isNotEmpty(Collection<T> collection)
Determines whether an collection is not empty
|
static <T> boolean |
isNotEmpty(T[] array)
Determines whether an array is not empty
|
static <K,V> ConcurrentMap<K,V> |
newConcurrentMap()
New ConcurrentMap
|
static <K,V> ConcurrentMap<K,V> |
newConcurrentMap(int initialCapacity)
New ConcurrentMap and initialCapacity
|
static <T> List<T> |
newLists(T... values)
New List and add values
|
static <K,V> HashMap<K,V> |
newMap()
New HashMap
|
static <K,V> HashMap<K,V> |
newMap(int initialCapacity)
New HashMap and initialCapacity
|
static <T> Set<T> |
newSets(T... values)
New Set and add values
|
public static <T> boolean isEmpty(T[] array)
T
- array typearray
- array objectpublic static <T> boolean isNotEmpty(T[] array)
T
- array typearray
- array objectpublic static <T> boolean isEmpty(Collection<T> collection)
T
- collection typecollection
- collection objectpublic static <T> boolean isNotEmpty(Collection<T> collection)
T
- collection typecollection
- collection objectpublic static <K,V> HashMap<K,V> newMap()
K
- HashMap Key typeV
- HashMap Value typepublic static <K,V> HashMap<K,V> newMap(int initialCapacity)
K
- HashMap Key typeV
- HashMap Value typeinitialCapacity
- initialCapacitypublic static <K,V> ConcurrentMap<K,V> newConcurrentMap()
K
- ConcurrentMap Key typeV
- ConcurrentMap Value typepublic static <K,V> ConcurrentMap<K,V> newConcurrentMap(int initialCapacity)
K
- ConcurrentMap Key typeV
- ConcurrentMap Value typeinitialCapacity
- initialCapacitypublic static <T> List<T> newLists(T... values)
T
- list typevalues
- list valuespublic static <T> Set<T> newSets(T... values)
T
- set typevalues
- set valuesCopyright © 2018. All rights reserved.