Java List Move Item minus(List initialList, List elementsToRemove)

Here you can find the source of minus(List initialList, List elementsToRemove)

Description

minus

License

Open Source License

Declaration

public static <T> List<T> minus(List<T> initialList, List<T> elementsToRemove) 

Method Source Code


//package com.java2s;
import java.util.*;

public class Main {
    public static <T> List<T> minus(List<T> initialList, List<T> elementsToRemove) {
        List<T> minusedList = new ArrayList<T>(initialList);
        minusedList.removeAll(elementsToRemove);
        return minusedList;
    }//  w  w  w . ja  v  a  2s . c  om
}

Related

  1. addRemoveChangeToString(int from, int to, List list, List removed)
  2. canMoveUp(List list, int[] indices)
  3. getLongestLine(String text, List partsToRemove, String separator)
  4. getRemoveAll(List list1, Collection list2)
  5. move(List aList, int anIndex1, int anIndex2)
  6. move(List collection, int indexToMoveFrom, int indexToMoveAt)
  7. moveBackward(final List list, final int[] indices)
  8. moveBefore(List list, T element, T referenceElement)