API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. EnumMap View Source
Author(s)
Josh Bloch
Since
1.5
Version
1.16, 04/21/06
Serial
Hierarchy
 Object
      AbstractMap
          EnumMap
Implements
 Serializable
 Cloneable
Subclasses
Description
public class EnumMap
  A specialized Map implementation for use with enum type keys.
See also:    EnumSet
Constructors
public EnumMap (Class< K> keyType)
  Creates an empty enum map with the specified key type.
public EnumMap (EnumMap< K, Object> m)
  Creates an enum map with the same key type as the specified enum map, initially containing the same mappings (if any).
public EnumMap (Map< K, Object> m)
  Creates an enum map initialized from the specified map.
Methods
Hide/Show inherited methods
public void clear () [Overrides AbstractMap]
Removes all mappings from this map.
public EnumMap< K, V> clone () [Overrides AbstractMap]
  Returns a shallow copy of this enum map.
public boolean containsKey (Object key) [Overrides AbstractMap]
  Returns true if this map contains a mapping for the specified key.
public boolean containsValue (Object value) [Overrides AbstractMap]
  Returns true if this map maps one or more keys to the specified value.
public Set<Entry< K, V>> entrySet () [Specified in AbstractMap]
  Returns a Set view of the mappings contained in this map.
public boolean equals (Object o) [Overrides AbstractMap]
  Compares the specified object with this map for equality.
public V get (Object key) [Overrides AbstractMap]
  Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
public int hashCode () [Inherited From AbstractMap]
  Returns the hash code value for this map.
public boolean isEmpty () [Inherited From AbstractMap]
  Returns true if this map contains no key-value mappings.
public Set< K> keySet () [Overrides AbstractMap]
  Returns a Set view of the keys contained in this map.
public V put ( K key, V value) [Overrides AbstractMap]
  Associates the specified value with the specified key in this map.
public void putAll (Map<Enum, Object> m) [Overrides AbstractMap]
  Copies all of the mappings from the specified map to this map.
public V remove (Object key) [Overrides AbstractMap]
  Removes the mapping for this key from this map if present.
public int size () [Overrides AbstractMap]
  Returns the number of key-value mappings in this map.
public String toString () [Inherited From AbstractMap]
  Returns a string representation of this map.
public Collection< V> values () [Overrides AbstractMap]
  Returns a Collection view of the values contained in this map.
Fields
Hide/Show inherited fields
pack-privatetransientvolatile Set< K> keySet [Inherited From AbstractMap]
  Each of these fields are initialized to contain an instance of the appropriate view the first time this view is requested.
pack-privatetransientvolatile Collection< V> values [Inherited From AbstractMap]
Nested Classes
  AbstractMap.SimpleEntry
An Entry maintaining a key and a value.
  AbstractMap.SimpleImmutableEntry
An Entry maintaining an immutable key and value.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar