java - Multimap with HashMultiset for values -
I have a (hash-based) multi-dimension (hash-based) trying with multiplexing values for each key I am here. See examples:
multimap & lt; Object, object & gt; Mamp = multimap NEm multimap (map object, archive & lt; object & gt; newhashmap), new supplement & lt; archive & gt; object & gt; & gt; () {public collection & lt; object & gt; Get () {HashMultiset.create ();}}}; Mmap.put ("1", "2");
But then,
System.out.println (mmap.get ("1") example multiset & lt;? & Gt;); // False, returned collection is not HashMultiset, // but a (private) wrapped compilation
It seems that I can not use built-in multiset? I wanted to be able to back it up, as a multilevel (wrapped in multisets.unmodifiableMultiset ()) I do not want to copy it every time in a new multiset. Maps & lt; K, Multiset & lt; V> & Gt; Switching back to
and adding complexity to my code, I have another option, which is to eliminate Multimap
? >
I'm scared that this does not seem possible. You should file a feature request. I have a secret suspicion that those cunning Google people have a multimap nifty, which can potentially release them that could potentially help you.
Comments
Post a Comment