MultiMap vs MultiValue Map [英] MultiMap vs MultiValue Map
本文介绍了MultiMap vs MultiValue Map的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
你可以尝试一下,但我怀疑有很大的区别,因为它做的事情也是一样的。
IMHO优点是更简单/更清晰的代码,通常比性能更重要。
At one place i have to use a map with many values mapped to a single key, so i was wondering whether there is any significant performance distinction between using HashMap of key, list and MultiMap of key , values in java.
解决方案
You can try it but I doubt there is much difference as it does much the same thing.
IMHO The advantage is simpler/clearer code which is usually more important than performance.
这篇关于MultiMap vs MultiValue Map的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文