org.exolab.javasource
public final class JNamedMap extends Object
Note: This class is not synchronized. So be careful. :-)
Constructor Summary | |
---|---|
JNamedMap()
Creates a new JNamedMap. | |
JNamedMap(int size)
Creates a new JNamedMap with the given size.
|
Method Summary | |
---|---|
Object | get(String name)
Returns the Object associated with the given name.
|
Object | get(int index)
Returns the Object at the given index.
|
String | getNameByObject(Object obj)
Returns the name associated with the given Object.
|
Vector | getNames()
Returns a Vector of names.
|
Vector | getObjects()
Returns a Vector of Objects.
|
int | indexOf(String name)
Returns the index of the Object which has been mapped (associated) with
the given name.
|
void | put(String name, Object obj)
Maps (associates) an Object with a name.
|
Object | remove(int index)
Removes and returns the Object located at the given index.
|
Object | remove(String name)
Removes and returns the Object associated with the given name.
|
int | size()
Returns the number of Object associations currently in this named map.
|
Parameters: size the initial size for this NamedMap
Parameters: name the name to search for
Returns: the Object associated with the given name
Parameters: index the index of the Object to return
Returns: the Object at the given index
Parameters: obj the Object to search for
Returns: the name of the given Object.
Returns: a Vector of names.
Returns: a Vector of Objects.
Parameters: name The name to get the index of
Returns: the index of the Object which has been mapped (associated) to the given name.
Parameters: name the name to associate with the given Object obj the Object to be mapped
Parameters: index the index of the Object to remove
Returns: the object removed from the map.
Parameters: name the name of the Object to remove
Returns: the object removed from the map.
Returns: the number of Object associations currently in this named map.