List of utility methods to do List Union
List | union(List union if (list1 == null || list2 == null) { return (list1 == null) ? new ArrayList<T>(list2) : new ArrayList<T>(list1); List<T> ret; if (duplicate) { ret = new ArrayList<T>(list1); ret.addAll(list2); } else { ... |
List | union(List union List<T> unionSet = new ArrayList<T>(set1); unionSet.addAll(set2); return unionSet; |
List | union(List Creates a union from all of the specified List s. List<T> newList = new LinkedList<>(); for (List<T> list : lists) { newList.addAll(list); return newList; |
void | unionAdd(List This method adds obj to vect if and only if vect does not already contain obj. if (obj == null) { return; if (vect.contains(obj)) { return; vect.add(obj); |
String | unionCreditList(List Creates the union of a list of credit ranges, returning the min and max credits found. if (list == null || list.isEmpty()) return ""; float minCredits = Integer.MAX_VALUE; float maxCredits = Integer.MIN_VALUE; for (String item : list) { String[] split = item.split("[ ,/-]"); String first = split[0]; float min = Float.parseFloat(first); ... |
List extends T> | unionList(Collection extends T> col1, Collection extends T> col2) union List List<T> result = new ArrayList<>(col1.size() + col2.size()); result.addAll(col1); result.addAll(col2); return result; |
List | unionList(List union List if (la == null) { la = new ArrayList<T>(); if (lb == null) { lb = new ArrayList<T>(); List<T> cpLa = new ArrayList<T>(); List<T> cpLb = new ArrayList<T>(); ... |
List | unionList(List Union list. if (isEmpty(list1) && isEmpty(list2)) { return new ArrayList<T>(); if (isEmpty(list1) && !isEmpty(list2)) { return list2; if (!isEmpty(list1) && isEmpty(list2)) { return list1; ... |
Set | unionOfListOfLists(final Collection extends Collection union Of List Of Lists if (collectionOfCollection == null || collectionOfCollection.isEmpty()) { return Collections.emptySet(); final HashSet<T> union = new HashSet<T>(); for (final Collection<T> col : collectionOfCollection) { if (col != null) { for (final T t : col) { if (t != null) { ... |
String | unionSeparator(List union Separator final StringBuilder sb = new StringBuilder(); sb.append(elements.get(0)); for (int i = 1; i < elements.size(); i++) { sb.append(separator); sb.append(elements.get(i)); return sb.toString(); |