org.exolab.castor.mapping
public interface MapHandler
Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:26 $
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.
|
Parameters: map the map to clear.
Throws: ClassCastException The MapHandler does not support collections of the given type.
Returns: the new map.
Parameters: map The map instance for which to return the enumeration of elements for.
Returns: An enumeration of all the elements in the Map.
Throws: ClassCastException The MapHandler does not support collections of this type
Parameters: map the map to return the object from. key the key for the object.
Returns: the object associated with the given key, or null if no association was found in the given map.
Throws: ClassCastException The MapHandler does not support maps of the given type.
Parameters: map The map instance for which to return the enumeration of keys.
Returns: An enumeration of all the keys in the Map.
Throws: ClassCastException The MapHandler does not support collections of this type
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
Throws: ClassCastException The MapHandler does not support maps of the given type.
Parameters: map the map.
Returns: Number of key-value associations in the Map
Throws: ClassCastException The MapHandler does not support collections of the given type.