/** * Removes from this set all of its elements that are contained in the * specified collection (optional operation). 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 <tt>true</tt> if this set changed as a result of the call * @throws UnsupportedOperationException if the <tt>removeAll</tt> operation * is not supported by this set * @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) * @see #contains(Object) */ @Override public synchronized boolean removeAll(Collection<?> c) { boolean modified = false; for(Object o : c) { modified = remove(o) || modified; } return modified; }
/** * Removes from this set all of its elements that are contained in the * specified collection (optional operation). 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 <tt>true</tt> if this set changed as a result of the call * @throws UnsupportedOperationException if the <tt>removeAll</tt> operation * is not supported by this set * @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) * @see #contains(Object) */ @Override public synchronized boolean removeAll(Collection<?> c) { boolean modified = false; for(Object o : c) { modified = remove(o) || modified; } return modified; }
public void addTriple(Statement triple) { addedTriples.add(triple); removedTriples.remove(triple); }
public void addTriple(Statement triple) { addedTriples.add(triple); removedTriples.remove(triple); }
public void removeTriple(Statement triple) { addedTriples.remove(triple); removedTriples.add(triple); }
public void removeTriple(Statement triple) { addedTriples.remove(triple); removedTriples.add(triple); }
if (tripleBatch == null || !tripleBatch.remove(triple)) {
if (tripleBatch == null || !tripleBatch.remove(triple)) {