List of utility methods to do List Union
List | sortedUnion(List args1, List args2) sorted Union SortedSet set = new TreeSet(); set.addAll(args1); set.addAll(args2); List lst = new ArrayList(set.size()); for (Iterator it = set.iterator(); it.hasNext();) { Object o = it.next(); lst.add(o); return lst; |