Package antlr.collections.impl
Class Vector
java.lang.Object
antlr.collections.impl.Vector
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintcapacity()Returns the current capacity of the vector.clone()elementAt(int i) Returns the element at the specified index.elements()voidensureCapacity(int minIndex) booleanvoidsetElementAt(Object obj, int i) intsize()
-
Field Details
-
data
-
lastElement
protected int lastElement
-
-
Constructor Details
-
Vector
public Vector() -
Vector
public Vector(int size)
-
-
Method Details
-
appendElement
-
capacity
public int capacity()Returns the current capacity of the vector. -
clone
-
elementAt
Returns the element at the specified index.- Parameters:
index- the index of the desired element- Throws:
ArrayIndexOutOfBoundsException- If an invalid index was given.
-
elements
-
ensureCapacity
public void ensureCapacity(int minIndex) -
removeElement
-
setElementAt
-
size
public int size()
-