|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.github.sd4324530.fastweixin.util.CollectionUtil
public final class CollectionUtil
集合常用方法工具类
| 方法摘要 | ||
|---|---|---|
static boolean |
isEmpty(Collection<?> collection)
判断一个集合是否为空 null或者空集合都会返回true |
|
static boolean |
isNotEmpty(Collection<?> collection)
判断一个集合是否不为空 |
|
static
|
newArrayList()
创建一个空集合 |
|
static
|
newArrayList(int initialCapacity)
创建一个指定大小的集合 |
|
static
|
newArrayList(T... ele)
创建一个有默认内容的集合 |
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public static boolean isEmpty(Collection<?> collection)
collection - 需要判断的集合
public static boolean isNotEmpty(Collection<?> collection)
collection - 需要判断的集合
public static <T> ArrayList<T> newArrayList()
T - 泛型
public static <T> ArrayList<T> newArrayList(int initialCapacity)
T - 泛型initialCapacity - 集合大小
public static <T> ArrayList newArrayList(T... ele)
T - 泛型ele - 内容
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||