Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.util.Collection;

public class Main {
    /**
     * Removes objects in array to the given collection
     * 
     * @param c
     *            collection from which remove each element of array.
     * @param array
     *            ~ items
     * @return the same collection which is passed as argument(but without
     *         element from array)
     */
    public static <E, T extends E> Collection<E> removeAll(Collection<E> c, T... array) {
        for (T obj : array) {
            c.remove(obj);
        }
        return c;
    }
}