Class EnumMap<K extends Enum<K>,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.EnumMap<K,V>
com.google.gwt.user.server.rpc.EnumMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

class EnumMap<K extends Enum<K>,V> extends EnumMap<K,V>
A serialization-compatible mock for EnumMap that uses an equal serialVersionUID and a compatible set of fields. When de-serializing an EnumMap instance into an instance of this class, e.g., by overriding ObjectInputStream's ObjectInputStream#resolveClass method such that it delivers this class instead of EnumMap, the fields are made accessible through getters; in particular, getKeyType() reveals the original EnumMap's key type, even if the map is empty.

The EnumMap#getEnumMapKeyType(java.util.EnumMap) method can be used to determine the key type of any EnumMap, even if it's empty.

  • Constructor Details

    • EnumMap

      EnumMap(Class<K> c)
  • Method Details

    • getKeyUniverse

      public K[] getKeyUniverse()
    • getVals

      public Object[] getVals()
    • getSize

      public int getSize()
    • getKeyType

      public Class<K> getKeyType()