List of all members.
Public Member Functions |
Object | create () |
Object | put (Object map, Object key, Object object) throws ClassCastException |
Enumeration | elements (Object map) throws ClassCastException |
Enumeration | keys (Object map) throws ClassCastException |
int | size (Object map) throws ClassCastException |
void | clear (Object map) throws ClassCastException |
Object | get (Object map, Object key) throws ClassCastException |
Detailed Description
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.
- Author:
- Keith Visco
- Version:
- Revision:
- 1.2
- Date:
- 2004/02/13 21:34:10
Member Function Documentation
void org.exolab.castor.mapping.MapHandler.clear |
( |
Object |
map |
) |
throws ClassCastException |
Object org.exolab.castor.mapping.MapHandler.create |
( |
|
) |
|
Enumeration org.exolab.castor.mapping.MapHandler.elements |
( |
Object |
map |
) |
throws ClassCastException |
Object org.exolab.castor.mapping.MapHandler.get |
( |
Object |
map, |
|
|
Object |
key | |
|
) |
| | throws ClassCastException |
Enumeration org.exolab.castor.mapping.MapHandler.keys |
( |
Object |
map |
) |
throws ClassCastException |
Object org.exolab.castor.mapping.MapHandler.put |
( |
Object |
map, |
|
|
Object |
key, |
|
|
Object |
object | |
|
) |
| | throws ClassCastException |
Adds the given key-value pair to the map. Keys must be unique. Adding a key-value pair to the map, when an existing association for that key already exists will cause the existing association to be overwritten.
The map is provided as a parameter and is returned as the return value if the returned map is a different object. That way the handler can create a new map if necessary.
- Parameters:
-
| map | the map, null if no map has been created yet. |
| key | the key for the object. |
| object | the object to add to the map. |
- Returns:
- The map with the new object if a different instance than the
map
parameter, null otherwise
- Exceptions:
-
| ClassCastException | The MapHandler does not support maps of the given type. |
Implemented in org.exolab.castor.mapping.handlers.J1MapHandler, and org.exolab.castor.mapping.handlers.J2MapHandler.
int org.exolab.castor.mapping.MapHandler.size |
( |
Object |
map |
) |
throws ClassCastException |
The documentation for this interface was generated from the following file: