|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.collections.impl.IndexedVector
A simple indexed vector: a normal vector except that you must specify a key when adding an element. This allows fast lookup and allows the order of specification to be preserved.
Field Summary | |
protected Vector |
elements
|
protected java.util.Hashtable |
index
|
Constructor Summary | |
IndexedVector()
IndexedVector constructor comment. |
|
IndexedVector(int size)
IndexedVector constructor comment. |
Method Summary | |
void |
appendElement(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
elementAt(int i)
Returns the element at the specified index. |
java.util.Enumeration |
elements()
|
java.lang.Object |
getElement(java.lang.Object key)
|
boolean |
removeElement(java.lang.Object key)
remove element referred to by key NOT value; return false if not found. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Vector elements
protected java.util.Hashtable index
Constructor Detail |
public IndexedVector()
public IndexedVector(int size)
size
- intMethod Detail |
public void appendElement(java.lang.Object key, java.lang.Object value)
public java.lang.Object elementAt(int i)
java.lang.ArrayIndexOutOfBoundsException
- If an invalid
index was given.public java.util.Enumeration elements()
public java.lang.Object getElement(java.lang.Object key)
public boolean removeElement(java.lang.Object key)
public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |