List of utility methods to do List Null Empty
boolean | isAllElementsNull(List is All Elements Null for (Object object : list) { if (object != null) return false; return true; |
boolean | isArrayEmpty(List> objList) is Array Empty if (objList == null) { return true; if (objList.size() == 0) { return true; return false; |
boolean | isCollectionListEmpty() return collection return collectionList.isEmpty();
|
boolean | isCommentOrEmptyLine(int lineIndex, List is Comment Or Empty Line if (linesOfFile == null || linesOfFile.isEmpty()) return true; String lineStr = ""; try { lineStr = linesOfFile.get(lineIndex).trim(); } catch (Exception e) { return false; if (lineStr.length() == 0) return true; if (lineStr.indexOf("//") == 0 || lineStr.indexOf("/*") == 0 || lineStr.indexOf("*/") >= 0) return true; int checkIndex = lineIndex - 1; while (checkIndex >= 0) { String previousLineString = linesOfFile.get(checkIndex).trim(); if (previousLineString.indexOf("/*") == 0) return true; if (previousLineString.indexOf("*/") >= 0) return false; checkIndex--; return false; |
boolean | isEmpty(Collection> list) is Empty return list == null || list.isEmpty();
|
boolean | isEmpty(final List> aList) is Empty return !(isNotEmpty(aList));
|
boolean | isEmpty(final List is Empty validate(values, position); final String value = values.get(position); return value == null || value.isEmpty(); |
boolean | isEmpty(final List Checks if a List is null or empty. return list == null || list.isEmpty();
|
boolean | isEmpty(final List is Empty if (objList == null || objList.isEmpty()) { return true; return false; |
boolean | isEmpty(java.util.List> list) Determine whether an List is null or empty. return list == null || list.size() == 0;
|