|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--java.util.Vector
Implement a growable array of objects
| Field Summary | |
protected int |
capacityIncrement
The amount to increment the size by |
protected int |
elementCount
number of elements |
protected Object[] |
elementData
The element data |
| Constructor Summary | |
Vector()
Create a new vector |
|
Vector(int ic)
Create a new vector of the particular size |
|
Vector(int ic,
int ci)
Create a new vector of a particular size |
|
| Method Summary | |
void |
addElement(Object obj)
Add an element at the end of the Vector. |
int |
capacity()
Return the current capacity - not the size |
boolean |
contains(Object elem)
Does it contain an object |
void |
copyInto(Object[] dest)
Copy the components into the array |
Object |
elementAt(int index)
Return the element at the particular position |
Enumeration |
elements()
Return the elements |
void |
ensureCapacity(int minCapacity)
Ensure there is capacity |
Object |
firstElement()
Return the first element in the vector |
int |
indexOf(Object elem)
Return the index of the element |
int |
indexOf(Object elem,
int index)
Return the index of the element |
void |
insertElementAt(Object obj,
int index)
Insert an element at a particular location |
boolean |
isEmpty()
Test to see if it is empty |
Object |
lastElement()
Return the last element in the vector |
int |
lastIndexOf(Object elem)
Return the last index of the element |
int |
lastIndexOf(Object elem,
int index)
Return the last index of the element |
void |
removeAllElements()
Remove all the elements |
boolean |
removeElement(Object obj)
Remove the first element with the particular value |
void |
removeElementAt(int index)
Remove the element at a particular position and reduce the size of the vector |
void |
setElementAt(Object obj,
int index)
Set the element at a particular position |
void |
setSize(int newSize)
Set the size |
int |
size()
Return the current size |
java.lang.String |
toString()
Convert to a string |
void |
trimToSize()
Trim the capacity to the current size |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int capacityIncrement
protected int elementCount
protected Object[] elementData
| Constructor Detail |
public Vector(int ic,
int ci)
throws IllegalArgumentException
ic - The initial capacityci - The capacity increment
IllegalArgumentException - if the initial capacity is negative
public Vector(int ic)
throws IllegalArgumentException
ic - The initial capacity
IllegalArgumentException - if the initial capacity is negativepublic Vector()
| Method Detail |
public void addElement(Object obj)
obj - The object to addpublic int capacity()
public boolean contains(Object elem)
elem - The element to find
public void copyInto(Object[] dest)
dest - The array to copy into
ArrayIndexOutOfBoundsException
ArrayStoreException - if the arrays are of incompatible types
NullPointerException - if the destination array is nullpublic Object elementAt(int index)
index - The indexpublic Enumeration elements()
public void ensureCapacity(int minCapacity)
minCapacity - the minimum capacity requiredpublic Object firstElement()
public int indexOf(Object elem)
elem - The element to find
public int indexOf(Object elem,
int index)
elem - The elementindex - The index to start from
public void insertElementAt(Object obj,
int index)
obj - The object to insertindex - The index to insert topublic boolean isEmpty()
public int lastIndexOf(Object elem)
elem - The element
public int lastIndexOf(Object elem,
int index)
elem - The elementindex - The index to start from
public Object lastElement()
public void removeAllElements()
public boolean removeElement(Object obj)
obj -
public void removeElementAt(int index)
index - The index to remove
public void setElementAt(Object obj,
int index)
obj - The element to setindex - The index to set it atpublic void setSize(int newSize)
newSize - The new sizepublic int size()
public void trimToSize()
public java.lang.String toString()
toString in class Object
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||