Classes | |
| class | IteratorEnumerator |
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 |
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.
| void org.exolab.castor.mapping.handlers.J2MapHandler.clear | ( | Object | map | ) | throws ClassCastException |
Clears the map of all key-value pairs.
| map | the map to clear. |
| ClassCastException | The MapHandler does not support collections of the given type. |
Implements org.exolab.castor.mapping.MapHandler.
| Object org.exolab.castor.mapping.handlers.J2MapHandler.create | ( | ) |
Creates a new Instance of the map represented by this MapHandler.
Implements org.exolab.castor.mapping.MapHandler.
Referenced by org.exolab.castor.mapping.handlers.J2MapHandler.elements(), org.exolab.castor.mapping.handlers.J2MapHandler.keys(), and org.exolab.castor.mapping.handlers.J2MapHandler.put().
| Enumeration org.exolab.castor.mapping.handlers.J2MapHandler.elements | ( | Object | map | ) | throws ClassCastException |
Returns an enumeration of all the objects in the Map.
| map | The map instance for which to return the enumeration of elements for. |
| ClassCastException | The MapHandler does not support collections of this type |
Implements org.exolab.castor.mapping.MapHandler.
References org.exolab.castor.mapping.handlers.J2MapHandler.create().
| Object org.exolab.castor.mapping.handlers.J2MapHandler.get | ( | Object | map, | |
| Object | key | |||
| ) | throws ClassCastException |
Returns the object associated with the given key.
| map | the map to return the object from. | |
| key | the key for the object. |
| ClassCastException | The MapHandler does not support maps of the given type. |
Implements org.exolab.castor.mapping.MapHandler.
| Enumeration org.exolab.castor.mapping.handlers.J2MapHandler.keys | ( | Object | map | ) | throws ClassCastException |
Returns an enumeration of all the keys in the Map.
| map | The map instance for which to return the enumeration of keys. |
| ClassCastException | The MapHandler does not support collections of this type |
Implements org.exolab.castor.mapping.MapHandler.
References org.exolab.castor.mapping.handlers.J2MapHandler.create().
| Object org.exolab.castor.mapping.handlers.J2MapHandler.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.
| 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. |
map parameter, null otherwise | ClassCastException | The MapHandler does not support maps of the given type. |
Implements org.exolab.castor.mapping.MapHandler.
References org.exolab.castor.mapping.handlers.J2MapHandler.create().
| int org.exolab.castor.mapping.handlers.J2MapHandler.size | ( | Object | map | ) | throws ClassCastException |
Returns the number of elements (key-value) in the map.
| map | the map. |
| ClassCastException | The MapHandler does not support collections of the given type. |
Implements org.exolab.castor.mapping.MapHandler.
1.7.0