ListUtil.java 681 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package cn.com.usky.utils;
  2. import java.util.List;
  3. /**
  4. * @author laowo
  5. * @version v1.0
  6. * @date 2020/2/22 15:41
  7. * @description 集合判断工具类
  8. **/
  9. public class ListUtil {
  10. /**
  11. * 判断集合是否为空
  12. * @param list
  13. * @return
  14. */
  15. public static boolean isNotBlank(List list) {
  16. if (list == null || list.isEmpty()) {
  17. return false;
  18. } else {
  19. return true;
  20. }
  21. }
  22. /**
  23. *
  24. * @param list
  25. * @return
  26. */
  27. public static boolean isBlank(List list) {
  28. if (list == null || list.isEmpty()) {
  29. return true;
  30. } else {
  31. return false;
  32. }
  33. }
  34. }