remove

abstract fun remove(element: E, occurrences: Int): Int(source)

Removes a number of occurrences of the specified element from this multiset. If the multiset contains fewer than this number of occurrences to begin with, all occurrences will be removed.

Return

the count of the element before the operation; possibly zero

See also

Parameters

element

the element to conditionally remove occurrences of

occurrences

the number of occurrences of the element to remove. May be zero, in which case no change will be made.

Throws

if occurrences is negative