Android Utililty Methods List Intersect

List of utility methods to do List Intersect

Description

The list of methods to do List Intersect are organized into topic(s).

Method

Listintersect(List first, List second)
intersect
ArrayList<T> result = new ArrayList<T>();
for (T obj : first) {
    if (second.contains(obj)) {
        result.add(obj);
return result;
Listintersection(List list1, List list2)
intersection
List<T> ret = new ArrayList<T>();
for (T i : list1) {
    if (list2.contains(i))
        ret.add(i);
return ret;