Java Utililty Methods List Null Empty

List of utility methods to do List Null Empty

Description

The list of methods to do List Null Empty are organized into topic(s).

Method

booleanisEmpty(List objList)
This function checks if the list of the objects is empty
return (isNull(objList) || (objList.size() == 0));
booleanisEmpty(List sourceList)
is null or its size is 0
 isEmpty(null)   =   true; isEmpty({})     =   true; isEmpty({1})    =   false; 
return (sourceList == null || sourceList.size() == 0);
booleanisEmptyList(List inputList)
To check whether the list is empty.
return inputList == null || inputList.isEmpty();
booleanisEmptyList(List list)
is Empty List
if (list != null && list.size() > 0) {
    return false;
} else {
    return true;
booleanisHelp(List args, boolean valOnEmpty)
is Help
if (args.isEmpty()) {
    return valOnEmpty;
String first = args.get(0);
return isHelpRequest(first);
booleanisListElementsEmpty(final List l)
Checks a list of elements to see if every element in the list is empty.
final Iterator it = l.iterator();
while (it.hasNext()) {
    final String s = (String) it.next();
    if (s != null && s.trim().length() > 0) {
        return false;
return true;
...
booleanisListEmpty(final List list)
Check whether List is empty.
if (list == null || list.isEmpty()) {
    return true;
return false;
BooleanisListEmpty(List oneList)
is List Empty
if (oneList == null || oneList.isEmpty()) {
    return true;
return false;
booleanisListEmpty(List list)
is List Empty
if (list == null || list.size() == 0) {
    return true;
for (String string : list) {
    if (!isEmpty(string)) {
        return false;
return true;
booleanisListNullOrEmpty(List lst)
is List Null Or Empty
return lst == null || lst.isEmpty();