Package antlr.collections.impl
Class Vector
- java.lang.Object
-
- antlr.collections.impl.Vector
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Vector extends java.lang.Object implements java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]dataprotected intlastElement
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendElement(java.lang.Object o)intcapacity()Returns the current capacity of the vector.java.lang.Objectclone()java.lang.ObjectelementAt(int i)Returns the element at the specified index.java.util.Enumerationelements()voidensureCapacity(int minIndex)booleanremoveElement(java.lang.Object o)voidsetElementAt(java.lang.Object obj, int i)intsize()
-
-
-
Method Detail
-
appendElement
public void appendElement(java.lang.Object o)
-
capacity
public int capacity()
Returns the current capacity of the vector.
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
elementAt
public java.lang.Object elementAt(int i)
Returns the element at the specified index.- Parameters:
index- the index of the desired element- Throws:
java.lang.ArrayIndexOutOfBoundsException- If an invalid index was given.
-
elements
public java.util.Enumeration elements()
-
ensureCapacity
public void ensureCapacity(int minIndex)
-
removeElement
public boolean removeElement(java.lang.Object o)
-
setElementAt
public void setElementAt(java.lang.Object obj, int i)
-
size
public int size()
-
-