Using Guava multisets or Collections.frequency()?
问题 I was using Multiset to have easy access to the freq of elements, but I realize there is Collections#frequency(Collection<?>, Object) that does the same for any collection. What is the point of using Multiset then? Is performance an issue here? 回答1: Guava documentation for Multiset#count() has to say: Note that for an Object.equals(java.lang.Object)-based multiset, this gives the same result as Collections.frequency(java.util.Collection, java.lang.Object) (which would presumably perform more