* ** Map <K, V> interface An object that maps keys to values. A map cannot contain
Duplicate keys; each key can map to at most one value.
Objects that map keys to values. A ing cannot contain duplicate keys. Each key can map only one value at most.
The keys in the map cannot be repeated, and hashCode is used for comparison. The effect is the same as that of equals,
It is faster to use hashCode.
Common Methods: 1. Object put (Object key, Object value)
Associates the specified value with the specified key in this map
Associate the specified value with the specified key in the ing.
Return Value: if the key in the map does not exist before, put it directly and return a null value,
If the key exists in the map, the new value replaces the old value and the value is returned.
2. Object get (Object key)
Returns the value to which the specified key is mapped.
Returns the value mapped to the specified key in the ing.
3. Object remove (Object key );
Removes the mapping for a key from this map if it is present
If the ing relationship of this key exists, remove it from the ing.
4. boolean containskey (Object key );
Returns true if this map contains a mapping for the specified key
Returns true if the ing contains the ing relationship of the specified key.
5. boolean containsValue (Object value)
Returns true if this map maps one or more keys to the specified value
Returns true if this ing maps one or more keys to a specified value.
6. int size ();
Returns the number of key-value mappings in this map
Returns the number of key-value ing relationships in the ing.
7. boolean isEmpty ()
Returns true if this map contains no key-value mappings.
Returns true if the ing does not contain a key-value ing relationship.
8. void putAll (Map map );
Copies all of the mappings from the specified map to this map
Copies all mappings from a specified ing to this ing (optional ).
9. void clear ();
Removes all of the mappings from this map.
Remove all mappings from this ing