Accept Lists and mark as empty or not
@param value
@return
768538
public static<R> Result<List<R>> ok(List<R> value) {
    	return new Result<List<R>>(value,OK,SUCCESS,null).emptyList(value.size()==0);
    }
556965
public static Boolean isNotSet(String value) {
        return null == value || value.isEmpty() || value.trim().length() == 0;
    }
445214
public static List<String> get(String name, @Nullable Boolean value) {
    if (Boolean.TRUE.equals(value)) {
      return Collections.singletonList("--" + name);
    }
    return Collections.emptyList();
  }
64163
public static List<String> getList(final String val, final boolean emptyOk) throws Throwable {
    List<String> l = new LinkedList<String>();

    if ((val == null) || (val.length() == 0)) {
      return l;
    }

    StringTokenizer st = new StringTokenizer(val, ",", false);
    while (st.hasMoreTokens()) {
      String token = st.nextToken().trim();

      if ((token == null) || (token.length() == 0)) {
        if (!emptyOk) {
          // No empty strings

          throw new Exception("List has an empty element.");
        }
        l.add("");
      } else {
        // Got non-empty element
        l.add(token);
      }
    }

    return l;
  }
1112053
public static <T> List<T> emptyToNull(final List<T> list) {
        if (isEmpty(list)) {
            return null;
        } else {
            return list;
        }
    }
788973
public List<ValidationResult> validate(Object value) {
		List<ValidationResult> results = new ArrayList<ValidationResult>();
		performValidation("", value, results);
		return results;
	}
297799
public Set<Machine> list(String field, String value) {
        return this.list(null, field, value);
    }
144139
function(list, value) {
      if (_.isArray(value)) {
        for (var i = 0; i < value.length; i++) {
          var valueItem = value[i];
          if (_.contains(list, valueItem)) {
            return true;
          }
        }
        return false;
      } else {
        return _.contains(list, value);
      }
    }
1241082
public static int listFindNoCaseIgnoreEmpty(String list, String value, char delimiter) {
	if (list == null) return -1;
	int len = list.length();
	if (len == 0) return -1;
	int last = 0;
	int count = 0;

	for (int i = 0; i < len; i++) {
	    if (list.charAt(i) == delimiter) {
		if (last < i) {
		    if (list.substring(last, i).equalsIgnoreCase(value)) return count;
		    count++;
		}
		last = i + 1;
	    }
	}
	if (last < len) {
	    if (list.substring(last).equalsIgnoreCase(value)) return count;
	}
	return -1;
    }
443408
List<String> split(String value) {
        if (value == null) {
            return Collections.emptyList();
        }
        String[] parts = value.split(",", -1);
        return Arrays.asList(parts);
    }
367804
public static Collection<String> split(final String value) {
        if (value == null) {
            return Collections.emptyList();
        }
        final String[] tokens = value.trim().split("\\s+");
        return asList(tokens);
    }
63177
static List<String> string(String name, @Nullable String value) {
    if (!Strings.isNullOrEmpty(value)) {
      return Arrays.asList("--" + name, value);
    }
    return Collections.emptyList();
  }
581754
public void setValue(String value) {
		contents = new ArrayList();
		contents.add(value);
		if (value.trim().length() > 0) {
			containsSingleString = true;
		}
	}
574216
protected boolean isEmpty(Object value) {
        if (value == null)
            return true;
        if ( value.equals("") )
            return true;
        return false;
    }
294986
public static boolean areNotEmpty(String... values) {
		boolean result = true;
		if (values == null || values.length == 0) {
			result = false;
		} else {
			for (String value : values) {
				result &= !isEmpty(value);
			}
		}
		return result;
	}
806604
public boolean containsValue(Object value) {
        Entry tab[] = table;
        
        if (value==null) {
            for (int i = tab.length ; i-- > 0 ;) {
                for (Entry e = tab[i] ; e != null ; e = e.next) {
                    if (e.value == null) {
                        return true;
                    }
                }
            }
        } 
        else {
            for (int i = tab.length ; i-- > 0 ;) {
                for (Entry e = tab[i] ; e != null ; e = e.next) {
                    if (value.equals(e.value)) {
                        return true;
                    }
                }
            }
        }
        
        return false;
    }
964882
private static <T> List<T> unmodifiableList(List<T> list) {
        if (list == null) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(list);
    }