Public Member Functions | Protected Attributes

antlr.collections.impl.IndexedVector Class Reference

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

antlr.collections.impl.IndexedVector.IndexedVector (  ) 
antlr.collections.impl.IndexedVector.IndexedVector ( int  size  ) 

Member Function Documentation

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.

Parameters:
index the index of the desired element
Exceptions:
ArrayIndexOutOfBoundsException If an invalid index was given.

References antlr.collections.impl.IndexedVector.elements().

Referenced by antlr.preprocessor.Grammar.toString().

Object antlr.collections.impl.IndexedVector.getElement ( Object  key  ) 
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 (  ) 

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties