/** * Removes all of the elements in <tt>collection</tt> from the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the remove all operation. */ public boolean removeAll( Collection<?> collection ) { boolean changed = false; int size = collection.size(); Iterator it; it = collection.iterator(); while ( size-- > 0 ) { if ( remove( it.next() ) ) { changed = true; } } return changed; }
/** * Removes all of the elements in <tt>collection</tt> from the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the remove all operation. */ public boolean removeAll( Collection<?> collection ) { boolean changed = false; int size = collection.size(); Iterator it; it = collection.iterator(); while ( size-- > 0 ) { if ( remove( it.next() ) ) { changed = true; } } return changed; }
/** * Removes all of the elements in <tt>collection</tt> from the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the remove all operation. */ public boolean removeAll( Collection<?> collection ) { boolean changed = false; int size = collection.size(); Iterator it; it = collection.iterator(); while ( size-- > 0 ) { if ( remove( it.next() ) ) { changed = true; } } return changed; }
/** * Removes all of the elements in <tt>collection</tt> from the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the remove all operation. */ public boolean removeAll( Collection<?> collection ) { boolean changed = false; int size = collection.size(); Iterator it; it = collection.iterator(); while ( size-- > 0 ) { if ( remove( it.next() ) ) { changed = true; } } return changed; }
/** * Removes all of the elements in <tt>collection</tt> from the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the remove all operation. */ @Override public boolean removeAll( Collection<?> collection ) { boolean changed = false; int size = collection.size(); Iterator<?> it; it = collection.iterator(); while ( size-- > 0 ) { if ( remove( it.next() ) ) { changed = true; } } return changed; }