public class CollUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <K,V> V |
computeIfAbsent(Map<K,V> map,
K key,
Function<K,V> mappingFunction)
A temporary workaround for Java 8 specific performance issue JDK-8161372 .
|
static boolean |
isEmpty(Collection<?> collection)
集合是否为空
|
static boolean |
isNotEmpty(Collection<?> collection)
集合是否为非空
|
static <T> List<List<T>> |
partition(List<T> list,
int size)
list 分片
|
public static boolean isEmpty(Collection<?> collection)
collection - 集合public static boolean isNotEmpty(Collection<?> collection)
collection - 集合public static <K,V> V computeIfAbsent(Map<K,V> map, K key, Function<K,V> mappingFunction)
K - 泛型V - 泛型map - mapkey - keymappingFunction - FunctionCopyright © 2025. All rights reserved.