|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.mapping.handlers.J1MapHandler
public final class J1MapHandler
A Map handler for adding and retreiving key-value pairs from A map. A map handler is instantiated only once, must be thread safe and not use any synchronization.
| Constructor Summary | |
|---|---|
J1MapHandler()
|
|
| Method Summary | |
|---|---|
void |
clear(Object map)
Clears the map of all key-value pairs. |
Object |
create()
Creates a new Instance of the map represented by this MapHandler. |
Enumeration |
elements(Object map)
Returns an enumeration of all the objects in the Map. |
Object |
get(Object map,
Object key)
Returns the object associated with the given key. |
Enumeration |
keys(Object map)
Returns an enumeration of all the keys in the Map. |
Object |
put(Object map,
Object key,
Object object)
Adds the given key-value pair to the map. |
int |
size(Object map)
Returns the number of elements (key-value) in the map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public J1MapHandler()
| Method Detail |
|---|
public Object create()
create in interface MapHandler
public Object put(Object map,
Object key,
Object object)
throws ClassCastException
put in interface MapHandlermap - the map, null if no map has been created yet.key - the key for the object.object - the object to add to the map.
ClassCastException - The MapHandler does not
support maps of the given type.
public Enumeration elements(Object map)
throws ClassCastException
elements in interface MapHandlermap - The map instance for which to return the enumeration
of elements for.
ClassCastException - The MapHandler does not
support collections of this type
public Enumeration keys(Object map)
throws ClassCastException
keys in interface MapHandlermap - The map instance for which to return the enumeration
of keys.
ClassCastException - The MapHandler does not
support collections of this type
public int size(Object map)
throws ClassCastException
size in interface MapHandlermap - the map.
ClassCastException - The MapHandler does not
support collections of the given type.
public void clear(Object map)
throws ClassCastException
clear in interface MapHandlermap - the map to clear.
ClassCastException - The MapHandler does not
support collections of the given type.
public Object get(Object map,
Object key)
throws ClassCastException
get in interface MapHandlermap - the map to return the object from.key - the key for the object.
ClassCastException - The MapHandler does not
support maps of the given type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||