@Override public boolean removeAll(Collection<?> c) { boolean changed = super.removeAll(c); if (changed) { // drop the transient set, will be rebuilt when/if needed synchronized(this) { knownGroupNamesInList = null; } } return changed; }
/** * Removes from this set all of its elements that are contained in the * specified collection. If the specified collection is also a set, * this operation effectively modifies this set so that its value is the * <i>asymmetric set difference</i> of the two sets. * * @param c collection containing elements to be removed from this set * @return {@code true} if this set changed as a result of the call * @throws ClassCastException if the class of an element of this set * is incompatible with the specified collection (optional) * @throws NullPointerException if this set contains a null element and the * specified collection does not permit null elements (optional), * or if the specified collection is null * @see #remove(Object) */ public boolean removeAll(Collection<?> c) { return al.removeAll(c); }
/** Removes from this list all of its elements that are contained in the specified collection */ public void removeAll(Collection<IpFilterRule> c) { if (c == null) { throw new NullPointerException("Collection can not be null"); } ipFilterRuleList.removeAll(c); }
public void close() { // remove far more efficiently handles.removeAll(this.registrations); super.close(); } }
public void removeLocator(final Class<? extends AssetLocator> locatorType, String rootPath){ ArrayList<ImplThreadLocal<AssetLocator>> locatorsToRemove = new ArrayList<ImplThreadLocal<AssetLocator>>(); Iterator<ImplThreadLocal<AssetLocator>> it = locatorsList.iterator(); while (it.hasNext()){ ImplThreadLocal locator = it.next(); if (locator.getPath().equals(rootPath) && locator.getTypeClass().equals(locatorType)){ //it.remove(); // copy on write list doesn't support iterator remove, // must use temporary list locatorsToRemove.add(locator); } } locatorsList.removeAll(locatorsToRemove); }
void deleteExpiredFile(List<MappedFile> files) { if (!files.isEmpty()) { Iterator<MappedFile> iterator = files.iterator(); while (iterator.hasNext()) { MappedFile cur = iterator.next(); if (!this.mappedFiles.contains(cur)) { iterator.remove(); log.info("This mappedFile {} is not contained by mappedFiles, so skip it.", cur.getFileName()); } } try { if (!this.mappedFiles.removeAll(files)) { log.error("deleteExpiredFile remove failed."); } } catch (Exception e) { log.error("deleteExpiredFile has exception.", e); } } }
taskGroupList.removeAll(toRemove);
tasks.removeAll( done );
this.threadStoreList.removeAll(removed);
void deleteExpiredFile(List<MappedFile> files) { if (!files.isEmpty()) { Iterator<MappedFile> iterator = files.iterator(); while (iterator.hasNext()) { MappedFile cur = iterator.next(); if (!this.mappedFiles.contains(cur)) { iterator.remove(); log.info("This mappedFile {} is not contained by mappedFiles, so skip it.", cur.getFileName()); } } try { if (!this.mappedFiles.removeAll(files)) { log.error("deleteExpiredFile remove failed."); } } catch (Exception e) { log.error("deleteExpiredFile has exception.", e); } } }
/** * Removes all layers in the input collection from this list, if present. * * @param layers the candidate layers to remove * @return {@code true} if any layers were removed; {@code false} otherwise */ @Override public boolean removeAll(Collection<?> layers) { for (Object obj : layers) { Layer element = (Layer) obj; if (!contains(element)) { continue; } if (layerListener != null) { element.removeMapLayerListener(layerListener); } element.dispose(); } boolean removed = super.removeAll(layers); fireLayerRemoved(null, 0, size() - 1); return removed; }
@Override public boolean removeAll(Collection<?> c) { if (super.removeAll(c)) { modCount.incrementAndGet(); return true; } return false; }
@Override public boolean removeAll(Collection<?> c) { if (super.removeAll(c)) { modCount.incrementAndGet(); return true; } return false; }
@Override public boolean removeAll(Collection<?> c) { if (super.removeAll(c)) { modCount.incrementAndGet(); return true; } return false; }
@Override public boolean removeAll(Collection c) { if (super.removeAll(c)) { modCount.incrementAndGet(); return true; } return false; }
/** Removes from this list all of its elements that are contained in the specified collection */ public void removeAll(Collection<IpFilterRule> c) { if (c == null) { throw new NullPointerException("Collection can not be null"); } ipFilterRuleList.removeAll(c); }
@Override public boolean removeAll(Collection<?> col) { boolean result = underlyingList.removeAll(col); markAsStale(); return result; }
public void close() { // remove far more efficiently handles.removeAll(this.registrations); super.close(); } }
@Override public boolean removeAll(Collection<?> col) { boolean result = underlyingList.removeAll(col); markAsStale(); return result; }
public void disconnect() { myReady = false; while (!myAllConnections.isEmpty()) { sleep(11); //noinspection MismatchedQueryAndUpdateOfCollection final Collection<Connection> toClose = new ArrayList<Connection>(myConnectionsLimit); myFreeConnections.drainTo(toClose, 100); myAllConnections.removeAll(toClose); for (Connection connection : toClose) closeConnection(connection); toClose.clear(); } }