Java List Null Empty isEmpty(List list)

Here you can find the source of isEmpty(List list)

Description

is Empty

License

Open Source License

Declaration

public static boolean isEmpty(List<String> list) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static boolean isEmpty(List<String> list) {
        if (list == null || list.size() == 0) {
            return true;
        }/* w  w  w. j  a  v a  2  s . c om*/
        if (list.size() == 1 && isEmpty(list.get(0))) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(String str) {
        if (str != null && str.trim().length() > 0) {
            return false;
        }
        return true;
    }
}

Related

  1. isEmpty(List list)
  2. isEmpty(List aList)
  3. isEmpty(List collection)
  4. isEmpty(List list, String message)
  5. isEmpty(List obj)
  6. isEmpty(List aList)
  7. isEmpty(List list)
  8. isEmpty(List objList)
  9. isEmpty(List sourceList)