A multiset is a rather peculiar and uncommon data structure. It is not, for instance, part of Java's standard library either. Guava does have one, and so does Boost, but Boost has basically everything.
If all you want is to count the number of occurrences of the elements, you could resort to a SortedMap
from element to count instead. If you require, on the other hand, for the elements to be distinct, retrievable, but equivalent under sorting rules, you could use a SortedMap
from element (not important which one) to a Set
of distinguished elements.