set Count
Adds or removes the necessary occurrences of an element such that the element attains the desired count.
Return
the count of the element before the operation; possibly zero
See also
Parameters
the element to add or remove occurrences of; may be null only if explicitly allowed by the implementation
the desired count of the element in this multiset
Throws
if count is negative
Conditionally sets the count of an element to a new value, as described in setCount, provided that the element has the expected current count. If the current count is not oldCount, no change is made.
Return
true if the condition for modification was met. This implies that the multiset was indeed modified, unless oldCount == newCount.
See also
Parameters
the element to conditionally set the count of; may be null only if explicitly allowed by the implementation
the expected present count of the element in this multiset
the desired count of the element in this multiset