Java List Remove remove(List list, List elements)

Here you can find the source of remove(List list, List elements)

Description

remove

License

Apache License

Declaration

static <T> List<T> remove(List<? extends T> list, List<? extends T> elements) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    static <T> List<T> remove(List<? extends T> list, List<? extends T> elements) {
        final ArrayList<T> result = new ArrayList<T>(list);
        result.removeAll(elements);//from   www  .  j  a  v a  2 s. com
        return result;
    }
}

Related

  1. remove(Collection entityList1, Collection entityList2, Comparator comparator)
  2. remove(final List list, final int index, final T defaultValue)
  3. remove(final List list, final T... objects)
  4. remove(List aList, Object anObj)
  5. remove(List models, int start, int count)
  6. remove(List list, Class type)
  7. remove(List as, int start, int end)
  8. remove(List list, E element)
  9. remove(List list, E object)