AbstractCollection.retainAll

{@inheritDoc}

<p>This implementation iterates over this collection, checking each element returned by the iterator in turn to see if it's contained in the specified collection. If it's not so contained, it's removed from this collection with the iterator's <tt>remove</tt> method.

<p>Note that this implementation will throw an <tt>UnsupportedOperationException</tt> if the iterator returned by the <tt>iterator</tt> method does not implement the <tt>remove</tt> method and this collection contains one or more elements not present in the specified collection.

@throws UnsupportedOperationException {@inheritDoc} @throws ClassCastException {@inheritDoc} @throws NullPointerException {@inheritDoc}

@see #remove(Object) @see #contains(Object)

class AbstractCollection(E)
bool
retainAll

Meta