|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ls.util.container.ReferenceIdentityHashtable
ReferenceIdentityHashtable differs from class hashtable in two main topics:
Note:Access to objects of this class is not synchronized.
Constructor Summary | |
ReferenceIdentityHashtable()
Constructor to initialize the key/value container with the default capacity of a Vector (10) |
|
ReferenceIdentityHashtable(int capacity)
Constructor to initialize the key/value container with the capacity passed as argument. |
Method Summary | |
void |
clear()
Removes all keys and values. |
boolean |
containsKey(Object key)
Returns true, if the object reference passed is existing as key in the attribute container. |
boolean |
containsValue(Object key)
Returns true, if the object reference passed is existing as value in the attribute container. |
Enumeration |
elements()
Returns an enumeration of the values of this class. |
Object |
get(Object key)
This function returns the attribute list of an object generated while parsing. |
boolean |
isEmpty()
Returns true, if no key value pairs are contained. |
Iterator |
keyIterator()
Returns an Iterator view on the stored keys. |
Enumeration |
keys()
Returns an enumeration of the keys of this class. |
void |
put(Object key,
Object value)
Adds an object reference (representing a tag and used as key) and a list of attributes belonging to that tag. |
void |
remove(Object key)
Removes the specified key and its value. |
int |
size()
Returns the number of key/value mappings stored within this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReferenceIdentityHashtable()
public ReferenceIdentityHashtable(int capacity)
capacity
- the number of key/value pairs the object can store initiallyMethod Detail |
public Object get(Object key)
key
- the object for which to get the attribute listpublic void put(Object key, Object value)
key
- the object reference representing the xml tagvalue
- the list of attributes contained in the tagpublic boolean containsKey(Object key)
key
- the object reference used as keypublic boolean containsValue(Object key)
key
- the object reference used as keypublic boolean isEmpty()
public void clear()
public void remove(Object key)
key
- the object reference (key) to be deletedpublic Enumeration elements()
public Enumeration keys()
public Iterator keyIterator()
Iterator
public int size()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |