Java Collection Remove removeAllFromSet(AbstractSet collection, Collection toRemove)

Here you can find the source of removeAllFromSet(AbstractSet collection, Collection toRemove)

Description

remove All From Set

License

Open Source License

Declaration

private static boolean removeAllFromSet(AbstractSet<?> collection, Collection<?> toRemove) 

Method Source Code


//package com.java2s;

import java.util.AbstractSet;

import java.util.Collection;

public class Main {
    private static boolean removeAllFromSet(AbstractSet<?> collection, Collection<?> toRemove) {
        boolean result = false;
        for (Object o : toRemove)
            result |= collection.remove(o);
        return result;
    }//w w  w. j  a  v a2  s  .  com
}

Related

  1. removeAll(final Collection c, final Object... array)
  2. removeAll(final Collection collection, final Collection remove)
  3. removeAll(final Collection collection, final T... objects)
  4. removeAllElements(Collection data, T value)
  5. removeAllFromCollection(Collection collection, Collection toRemove)
  6. removeAny(Collection collection)
  7. removeArrayMarkerFromCollectionToString(Collection col)
  8. removeArrayToCollection(T[] array, Collection collection)
  9. removed(Collection old, Collection nu)