| java.util.HashMap jaxx.ClassMap
ClassMap | public class ClassMap extends HashMap (Code) | | A Map implementation which uses Classes as keys. ClassMap differs from typical maps
in that it takes subclasses into account; mapping a class to a value also maps all subclasses of
that class to the value.
A get operation will return the value associated with the class itself, or failing
that, with its nearest ancestor for which there exists a mapping.
|
Method Summary | |
public Object | get(Object key) Returns the value associated with the key Class . | public Object | put(Object key, Object value) Associates a value with a class and all of its descendents. |
get | public Object get(Object key)(Code) | | Returns the value associated with the key Class . If the class itself does not have
a mapping, its superclass will be checked, and so on until an ancestor class with a mapping is
located. If none of the class' ancestors have a mapping, null is returned.
Parameters: key - the class to check the mapping for the class |
put | public Object put(Object key, Object value)(Code) | | Associates a value with a class and all of its descendents.
Parameters: key - the class to map Parameters: value - the value to map to the class the old value associated with the class |
|
|