List of utility methods to do List Add Unique
boolean | addUniq(List add Uniq if (!list.contains(object)) return list.add(object); return false; |
void | addUnique(java.util.List add Unique if (!l.contains(e)) {
l.add(e);
|
List | addUnique(List Adds an object to the given list if object is absent (creates list if missing). return contains(aList, anObj) ? aList : add(aList, anObj);
|
void | addUnique(List add Unique if (isInList(list, item) == null) {
list.add(item);
|
boolean | addUnique(List add Unique if (!list.contains(item)) { list.add(item); return true; } else { return false; |
List | addUniqueId(List Adds an object to the given list if identical object is missing (creates list if missing). return containsId(aList, anObj) ? aList : add(aList, anObj);
|
void | addUniqueItems(List from, List to) add Unique Items if (from == null || to == null || from.size() == 0) { return; for (Iterator it = from.iterator(); it.hasNext();) { Object o = it.next(); if (!to.contains(o)) { to.add(o); |
void | addUniqueValues(List Adds values from the source list to the target list only if they don't already exist in the target for (T item : source) { if (!target.contains(item)) { target.add(item); |