Java Utililty Methods List Value Add All

List of utility methods to do List Value Add All

Description

The list of methods to do List Value Add All are organized into topic(s).

Method

voidAddToList(List tips, String tip)
Add To List
for (String exist : tips) {
    if (exist.equals(tip)) {
        return;
tips.add(tip);
ListaddToList(List dest, T src)
add To List
if (src != null && !dest.contains(src)) {
    dest.add(src);
return dest;
ListaddToList(List list, T value)
Check and adds elements to list (create new ArrayList if list is null)
if (value == null)
    return list;
if (list == null)
    list = new ArrayList<T>();
list.add(value);
return list;
voidaddToList(List list, T[] array)
add To List
if (list == null || array == null)
    return;
for (T t : array)
    list.add(t);
ListaddToList(List list, U... items)
Add a varargs list of items to the specified list.
if (list != null && items != null) {
    for (int i = 0; i < items.length; i++) {
        list.add(items[i]);
    if (list instanceof ArrayList) {
        ((ArrayList<T>) list).trimToSize();
return list;