List of utility methods to do Collection Remove
void | removeAll(Collection remove All if (left != null && right != null) {
left.removeAll(right);
|
List | removeAll(Collection remove All List<T> list = new ArrayList<>(source); list.removeAll(remove); return list; |
boolean | removeAll(final Collection> c, final Object... array) remove All boolean result = false; for (final Object element : array) { result |= c.remove(element); return result; |
List | removeAll(final Collection Removes the elements in remove from collection .
final List<E> list = new ArrayList<E>(); for (final E obj : collection) { if (!remove.contains(obj)) { list.add(obj); return list; |
boolean | removeAll(final Collection Removes all objects from the specified list. boolean result = false; for (final T object : objects) { result |= collection.remove(object); return result; |
void | removeAllElements(Collection remove All Elements if (data == null) return; while (data.contains(value)) data.remove(value); |
boolean | removeAllFromCollection(Collection collection, Collection toRemove) Removes each element in given collection one by one from specified collection. boolean changed = false; for (Object obj : toRemove) { changed |= collection.remove(obj); return changed; |
boolean | removeAllFromSet(AbstractSet> collection, Collection> toRemove) remove All From Set boolean result = false; for (Object o : toRemove) result |= collection.remove(o); return result; |
T | removeAny(Collection remove Any T item = null; if (collection.iterator().hasNext()) item = collection.iterator().next(); return item; |
String | removeArrayMarkerFromCollectionToString(Collection remove Array Marker From Collection To String return col.toString().replaceAll("\\[", "").replaceAll("\\]", ""); |