First of all, this: Multiset exactly matches the Collection contract and usually works better with other JDK collection utilities. In addition, Multiset supports generics, supports the entrySet () method and the setCount method, none of which are offered by Bag.
They serve the same purpose as you can clearly say, but I would like to think that Multiset wins in most cases.
source share