List of utility methods to do List Union
Iterable | shallowUnionCol(Collection
shallow Union Col return shallowUnion(new ArrayList<>(values).toArray(new List[] {})); |
char[] | union(final char[]... list) union StringBuilder sb = new StringBuilder(); for (char[] characters : list) { for (int i = 0; i < list.length; i++) { if (!contains(sb, characters[i])) { sb.append(list[i]); char[] toReturn = new char[sb.length()]; sb.getChars(0, sb.length(), toReturn, 0); Arrays.sort(toReturn); return toReturn; |
List | union(final List list1, final List list2) Returns a new list containing the second list appended to the first list. final ArrayList result = new ArrayList(list1); result.addAll(list2); return result; |
List | union(final List list1, final List list2) Returns a new list containing the second list appended to the first list. final ArrayList result = new ArrayList(list1); result.addAll(list2); return result; |
List | union(final List extends E> list1, final List extends E> list2) union final List<E> result = new ArrayList<E>(list1.size() + list2.size()); result.addAll(list1); result.addAll(list2); return result; |
List | union(final List union if (list1 == null || list2 == null) throw new NullPointerException("Not initizalized lists"); List<E> concat = new ArrayList<E>(list1.size() + list2.size()); concat.addAll(list1); E item; ListIterator<E> iter = list1.listIterator(); while (iter.hasNext()) { item = iter.next(); ... |
List | union(final List Unions the given array of lists into a single list. final List<T> union = new ArrayList<>(); for (List<T> list : lists) { union.addAll(list); return union; |
List | Union(List A, List B) Union if (A == null) return B; if (B == null) return A; List list = new ArrayList(A); for (Iterator i = B.iterator(); i.hasNext();) { Object o = i.next(); if (!list.contains(o)) ... |
List | union(List ls, List ls2) union List list = new ArrayList(Arrays.asList(new Object[ls.size()])); Collections.copy(list, ls); list.addAll(ls2); return list; |
byte[] | union(List union int size = 0; for (byte[] bs : byteList) { size += bs.length; byte[] ret = new byte[size]; int pos = 0; for (byte[] bs : byteList) { System.arraycopy(bs, 0, ret, pos, bs.length); ... |