List of utility methods to do List Intersect
List | intersect(List intersect ArrayList<T> result = new ArrayList<T>(); for (T obj : first) { if (second.contains(obj)) { result.add(obj); return result; |
List | intersection(List intersection List<T> ret = new ArrayList<T>(); for (T i : list1) { if (list2.contains(i)) ret.add(i); return ret; |