Java List Difference difference(List lst1, List lst2)

Here you can find the source of difference(List lst1, List lst2)

Description

difference

License

Open Source License

Declaration

public static <T1> void difference(List<T1> lst1, List<T1> lst2) 

Method Source Code


//package com.java2s;

import java.util.*;

public class Main {
    public static <T1> void difference(List<T1> lst1, List<T1> lst2) {
        for (T1 elem : lst2) {
            lst1.remove(elem);//from w  w w. j  a va2  s . c o  m
        }
    }
}

Related

  1. diffAsSet(Collection list1, Collection list2)
  2. difference(final List minuend, final List subtrahend)
  3. difference(final List list1, final List list2)
  4. difference(final String[] list1, final String[] list2)
  5. difference(List firstList, List secondList)
  6. difference(List set1, List set2)
  7. differenceOfList(List a, List b)
  8. differentCategory(String prop1, String prop2, List cat1, List cat2)
  9. diffFloats(List a, List b)