Here you can find the source of removeArrayToCollection(T[] array, Collection
public static <T> void removeArrayToCollection(T[] array, Collection<T> collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { /**/*from www . j a v a 2 s . c om*/ * Removes */ public static <T> void removeArrayToCollection(T[] array, Collection<T> collection) { for (int i = 0; i < array.length; i++) { if (array[i] != null) { collection.remove(array[i]); } } } }