public final class CollectionUtil extends Object
| 构造器和说明 |
|---|
CollectionUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> void |
addArray(Collection<T> collection,
T[] array)
将数组的内容添加到集合
|
static <T,R> List<R> |
buildList(Collection<T> targets,
IHandler<T,R> handler)
构建结果列表
|
static boolean |
isEmpty(Collection<?> collection)
是否为空
|
static boolean |
isNotEmpty(Collection<?> collection) |
public static boolean isEmpty(Collection<?> collection)
collection - 集合public static boolean isNotEmpty(Collection<?> collection)
public static <T,R> List<R> buildList(Collection<T> targets, IHandler<T,R> handler)
T - 入参R - 出参targets - 原始信息handler - 处理接口public static <T> void addArray(Collection<T> collection, T[] array)
T - 泛型collection - 集合array - 数组Copyright © 2021. All rights reserved.