| java.lang.Object | ||
| ↳ | java.util.AbstractMap<K, V> | |
| ↳ | java.util.EnumMap<K extends java.lang.Enum<K>, V> | |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an empty enum map using the given key type.
| |||||||||||
Constructs an enum map using the same key type as the given enum map and
initially containing the same mappings.
| |||||||||||
Constructs an enum map initialized from the given map.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Removes all mappings in this map.
| |||||||||||
Returns a shallow copy of this map.
| |||||||||||
Returns true if this map has a mapping for the given key.
| |||||||||||
Returns true if this map has one or more keys mapped to the given value.
| |||||||||||
Returns a Set} view of the mappings contained in this map.
| |||||||||||
Compares the given object with this map.
| |||||||||||
Returns the value which is mapped to the given key in this map, or null
if this map has no mapping for the given key.
| |||||||||||
Returns a Set} view of the keys contained in this map.
| |||||||||||
Associates the given value with the given key in this map.
| |||||||||||
Copies all the mappings in the given map to this map.
| |||||||||||
Removes the mapping for this key from this map if it is present.
| |||||||||||
Returns the number of the mappings in this map.
| |||||||||||
Returns a Collection} view of the values contained in this map.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.AbstractMap
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.util.Map
| |||||||||||
Constructs an empty enum map using the given key type.
| keyType | the class object of the key type used by this enum map |
|---|
| NullPointerException | if the keyType is null |
|---|
Constructs an enum map using the same key type as the given enum map and initially containing the same mappings.
| map | the enum map from which this enum map is initialized |
|---|
| NullPointerException | if the map is null |
|---|
Constructs an enum map initialized from the given map. If the given map is an EnumMap instance, this constructor behaves in the exactly the same way as EnumMap(EnumMap)}. Otherwise, the given map at least should contain one mapping.
| map | the map from which this enum map is initialized |
|---|
| IllegalArgumentException | if the map is not an enum map instance and does not contain any mappings |
|---|---|
| NullPointerException | if the map is null |
Removes all mappings in this map.
Returns a shallow copy of this map.
Returns true if this map has a mapping for the given key.
| key | the key whose presence in this map is to be tested |
|---|
Returns true if this map has one or more keys mapped to the given value.
| value | the value whose presence in this map is to be tested |
|---|
Returns a Set} view of the mappings contained in this map. The returned set complies with the general rule specified in entrySet()}. The set's iterator will return the mappings in the their keys' natural order(the enum constants are declared in this order)
Compares the given object with this map. Returns true if the given object is equal to this map.
| object | the object to be compared with this map |
|---|
Returns the value which is mapped to the given key in this map, or null if this map has no mapping for the given key.
| key | the key whose associated value is to be returned |
|---|
Associates the given value with the given key in this map. If the map previously had a mapping for this key, the old value is replaced.
| key | the key with which the given value is to be associated value |
|---|---|
| value | the value to be associated with the given key |
| NullPointerException | if the given key is null |
|---|
Copies all the mappings in the given map to this map. These mappings will replace all mappings that this map had for all of the keys currently in the given map.
| map | the key whose presence in this map is to be tested |
|---|
| NullPointerException | if the given map is null, or if one or more keys in the given map are null |
|---|
Removes the mapping for this key from this map if it is present.
| key | the key whose mapping is to be removed from this map |
|---|
Returns the number of the mappings in this map.
Returns a Collection} view of the values contained in this map. The returned collection complys with the general rule specified in values()}. The collection's iterator will return the values in the their corresponding keys' natural order(the enum constants are declared in this order)