We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b10ef34 commit f2ee782Copy full SHA for f2ee782
src/main/java/com/collection/CollectionUtilsDemo.java
@@ -0,0 +1,21 @@
1
+package com.collection;
2
+
3
+import org.apache.commons.collections.CollectionUtils;
4
5
+import java.util.ArrayList;
6
+import java.util.List;
7
8
+/**
9
+ * @Auther: Administrator
10
+ * @Date: 2019\10\17 0017 23:11
11
+ * @Description: 判断集合是否为空。简单方便的工具类
12
+ */
13
+public class CollectionUtilsDemo {
14
+ public static void main(String[] args) {
15
+ List<String> list=new ArrayList<>();
16
+ if(CollectionUtils.isEmpty(list)){
17
+ System.out.println("list集合为空");
18
+ }
19
20
21
+}
0 commit comments