removeAll

public abstract boolean removeAll(Collection<? extends E> c)

Removes from this filter all of its elements that are contained in the specified collection (optional operation). All element contained in the specified collection must be contained in the filter prior to invocation. Removing elements that aren't contained in the filter may put the filter in an inconsistent state causing it to return false negative responses from contains.

If false is returned, this is definitely an indication that the specified collection contained elements that were not contained in this filter prior to invocation. If the implementation treats this condition as an error, then this filter can no longer be relied upon to return correct false responses from contains, unless isEmpty is also true.

Return

true if all of the elements of the specified collection were successfully removed from the filter, false if any of the elements was not successfully removed

Parameters

c

collection containing elements to be removed from this filter

See also

Throws

if the types of one or more elements in the specified collection are incompatible with this filter (optional)

if the specified collection contains one or more null elements and this filter does not permit null elements (optional), or if the specified collection is null

if the removeAll operation is not supported by this filter


public abstract boolean removeAll(ProbabilisticFilter<E> f)

Subtracts the specified filter from this filter. The mutations happen to this instance. Callers must ensure that the specified filter represents elements that are currently contained in this filter.

If false is returned, this is definitely an indication that the specified filter contained elements that were not contained in this filter prior to invocation. If the implementation treats this condition as an error, then this filter can no longer be relied upon to return correct false responses from contains, unless isEmpty is also true.

Return

true if the operation was successful, false otherwise

Parameters

f

filter containing elements to remove from this filter. f is not mutated

See also

Throws

if the removeAll operation is not supported by this filter

if the specified filter is null