映射表是一种数据结构,用于存放键值对。如果提供了键,就能查找到值。
Map接口的方法:
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all of the mappings from this map (optional operation).
|
boolean |
containsKey(Object key)
Returns
true if this map contains a mapping for the specified key.
|
boolean |
containsValue(Object value)
Returns
true if this map maps one or more keys to the specified value.
|
Set<Map.Entry<K,V>> |
|