【发布时间】:2020-06-25 09:36:12
【问题描述】:
因为需要从大量数据中检索值时需要散列。但有时这也是可能的,我们需要这样的集合来存储最小数据的键值对。
【问题讨论】:
-
LinkedHashMap, TreeMap
标签: java dictionary collections hashmap set
因为需要从大量数据中检索值时需要散列。但有时这也是可能的,我们需要这样的集合来存储最小数据的键值对。
【问题讨论】:
标签: java dictionary collections hashmap set
看看documentation中的接口Map就行了。在那里你可以找到键值存储的其他实现:
所有已知的实现类: AbstractMap, Attributes, AuthProvider, ConcurrentHashMap, ConcurrentSkipListMap, EnumMap, HashMap, Hashtable, Headers, IdentityHashMap, LinkedHashMap, PrinterStateReasons, Properties, Provider, RenderingHints, ScriptObjectMirror, SimpleBindings, TabularDataSupport, TreeMap, UIDefaults, WeakHashMap
【讨论】:
Pair,但仍需要第三方 dep:commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/…