Check that a list is not null and not empty.
@param list the list of T.
@param name parameter name for the exception message.
186819
public static <T> Collection<T> notEmpty(Collection<T> list, String name) {
        notNull(list, name);
        if (list.isEmpty()) {
            throw new IllegalArgumentException(String.format("Collection %s is empty", name));
        }
        return list;
    }
536582
public boolean isNull(String name) {
        JsonElement value = nameValuePairs.get(name);
        return value.isNull();
    }
7919
public void put(String name,List list)
    {
        if (list==null || list.size()==0)
        {
            remove(name);
            return;
        }
        
        Object v=list.get(0);
        if (v!=null)
            put(name,v.toString());
        else
            remove(name);
        
        if (list.size()>1)
        {    
            java.util.Iterator iter = list.iterator();
            iter.next();
            while(iter.hasNext())
            {
                v=iter.next();
                if (v!=null)
                    add(name,v.toString());
            }
        }
    }
1276310
public static boolean isValid(final String name) {
        if (name == null) {
            return true;
        }
        for (final FileOrder fo : INSTANCES) {
            if (fo.name.equals(name)) {
                return true;
            }
        }
        return false;
    }
121492
static <T> List<T> freeze(List<T> list) {
        return list == null ? null : Collections.unmodifiableList(list);
    }
184694
public void writeEmptyElement(String name, List att) throws KNXMLException
	{
		try {
			final Tag tag = new Tag(name, att, null, true);
			tag.endTag();
		}
		catch (final IOException e) {
			throw new KNXMLException(e.getMessage());
		}
	}
1321991
public static void notNullOrEmpty(File parameter, String name) throws IllegalArgumentException {
		if (parameter == null || parameter.getPath().isEmpty()) {
			throw new IllegalArgumentException(name + " path is null or empty.");
		}
	}
978305
public static void parameterNotEmpty(final String name, final String value) {
        if (value != null && value.length() == 0) {
            raiseError(format("Parameter '%s' is expected to NOT be empty.", name));
        }
    }
790991
private boolean walkInvalidList(String className, String name, String[][] list) {
        boolean isInvalidCombination = false;

        for (int i = 0; i != list.length; i++) {
            if (className.equalsIgnoreCase(list[i][0])) {
                if (name.equalsIgnoreCase(list[i][1])) {
                    isInvalidCombination = true;
                    break;
                }
            }
        }
        return isInvalidCombination;
    }
1112053
public static <T> List<T> emptyToNull(final List<T> list) {
        if (isEmpty(list)) {
            return null;
        } else {
            return list;
        }
    }
220806
public static void isNotEmpty( Object[] argument,
                                   String name ) {
        isNotNull(argument, name);
        if (argument.length == 0) {
            throw new IllegalArgumentException(CommonI18n.argumentMayNotBeEmpty.text(name));
        }
    }
313346
public void add(List list) {
	if (values == null) values = new LinkedList();
	values.add(list);
    }
792195
static List<String> stringWithEq(String name, @Nullable String value) {
    if (!Strings.isNullOrEmpty(value)) {
      return Collections.singletonList("--" + name + "=" + value);
    }
    return Collections.emptyList();
  }
1101590
public boolean is_empty(String name) {
        DbDatum datum = getDatum(name);
        return datum==null || datum.is_empty();
    }
379000
public static <T> void notNull(final String name, final T value) {
    if (value == null) {
      throw new IllegalArgumentException(name + " can not be null");
    }
  }
1294952
static List<String> integer(String name, @Nullable Integer value) {
    if (value != null) {
      return Arrays.asList("--" + name, value.toString());
    }
    return Collections.emptyList();
  }
234061
public static boolean isValid(final String name) {
        if (name == null) {
            return true;
        }
        for (final FileHandlerResult result : INSTANCES) {
            if (result.name.equals(name)) {
                return true;
            }
        }
        return false;
    }