remove All
Removes from this filter all of its elements that are contained in the specified collection. All element contained in the specified collection must be contained in the filter prior to invocation.
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, and this filter can no longer be relied upon to return correct false
responses from contains, unless isEmpty is also true
.
Some elements of c
may have been removed from the filter even when false
is returned. In this case, the caller may add the additions by comparing the filter sizeLong before and after the invocation, knowing that removals from
c
occurred in c
's iteration order.
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
collection containing elements to be removed from this filter
See also
Throws
if the specified collection contains one or more null
elements, or if the specified collection is null
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 and 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
filter containing elements to remove from this
filter - f
is not mutated
See also
Throws
if the specified filter is null
if isCompatible== false
given f