Public Member Functions | |
IndexedVector () | |
IndexedVector (int size) | |
synchronized void | appendElement (Object key, Object value) |
Object | elementAt (int i) |
Enumeration | elements () |
Object | getElement (Object key) |
synchronized boolean | removeElement (Object key) |
int | size () |
Protected Attributes | |
Vector | elements |
Hashtable | index |
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.
antlr.collections.impl.IndexedVector.IndexedVector | ( | ) |
IndexedVector constructor comment.
References antlr.collections.impl.IndexedVector.elements(), and antlr.collections.impl.IndexedVector.index.
antlr.collections.impl.IndexedVector.IndexedVector | ( | int | size | ) |
IndexedVector constructor comment.
size | int |
References antlr.collections.impl.IndexedVector.elements(), and antlr.collections.impl.IndexedVector.index.
synchronized void antlr.collections.impl.IndexedVector.appendElement | ( | Object | key, | |
Object | value | |||
) |
Object antlr.collections.impl.IndexedVector.elementAt | ( | int | i | ) |
Returns the element at the specified index.
index | the index of the desired element |
ArrayIndexOutOfBoundsException | If an invalid index was given. |
References antlr.collections.impl.IndexedVector.elements().
Referenced by antlr.preprocessor.Grammar.toString().
Enumeration antlr.collections.impl.IndexedVector.elements | ( | ) |
Object antlr.collections.impl.IndexedVector.getElement | ( | Object | key | ) |
References antlr.collections.impl.IndexedVector.index.
Referenced by antlr.preprocessor.Grammar.expandInPlace(), and antlr.preprocessor.Grammar.inherit().
synchronized boolean antlr.collections.impl.IndexedVector.removeElement | ( | Object | key | ) |
remove element referred to by key NOT value; return false if not found.
References antlr.collections.impl.IndexedVector.elements(), and antlr.collections.impl.IndexedVector.index.
int antlr.collections.impl.IndexedVector.size | ( | ) |
References antlr.collections.impl.IndexedVector.elements().
Referenced by antlr.preprocessor.Grammar.toString().
Vector antlr.collections.impl.IndexedVector.elements [protected] |
Hashtable antlr.collections.impl.IndexedVector.index [protected] |