Example usage for java.util AbstractSet remove

List of usage examples for java.util AbstractSet remove

Introduction

In this page you can find the example usage for java.util AbstractSet remove.

Prototype

boolean remove(Object o);

Source Link

Document

Removes the specified element from this set if it is present (optional operation).

Usage

From source file:Main.java

private static boolean removeAllFromSet(AbstractSet<?> collection, Collection<?> toRemove) {
    boolean result = false;
    for (Object o : toRemove)
        result |= collection.remove(o);
    return result;
}