Java List Subtract subtractAsList(T[] array1, T[] array2)

Here you can find the source of subtractAsList(T[] array1, T[] array2)

Description

subtract As List

License

Open Source License

Declaration

public static <T> List<T> subtractAsList(T[] array1, T[] array2) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {
    public static <T> List<T> subtractAsList(T[] array1, T[] array2) {
        List<T> list = new ArrayList<>(Arrays.asList(array1));
        list.removeAll(Arrays.asList(array2));
        return list;
    }/*  w  w  w . j a  v  a  2s  . co  m*/
}

Related

  1. subtract(List a, List b)
  2. subtract(List vector, int[] sparseVector)
  3. subtract(List a, List b)
  4. subtract(List aList, List bList)
  5. subtract(String[] list1, String[] list2)
  6. subtractFloatLists(List listA, List listB)
  7. subtractFromList(List op1, Object op2)
  8. subtractQ(LinkedList Q, List P)