|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tinyline.tiny2d.TinyVector
The TinyVector class implements a growable array of
objects.
| Field Summary | |
int |
count
The number of elements in this TinyVector object. |
java.lang.Object[] |
data
The array buffer where the elements of the TinyVector are stored. |
| Constructor Summary | |
TinyVector(int i)
Creates an empty vector with the specified initial capacity. |
|
TinyVector(TinyVector src)
Creates a new vector as a copy of the specified vector. |
|
| Method Summary | |
void |
addElement(java.lang.Object obj)
Adds the object to the end of this vector, increasing its size by one. |
int |
indexOf(java.lang.Object obj,
int i)
Searches for the first occurence of the given object, starting at i, and testing for equality using
the equals method. |
int |
insertElementAt(java.lang.Object obj,
int i)
Inserts the object as an element in this vector at the specified index i. |
int |
lastIndexOf(java.lang.Object obj,
int i)
Searches backwards for the specified object, starting from the specified index, and returns an index to it. |
int |
removeElementAt(int i)
Deletes the object at the specified index i. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.Object[] data
public int count
| Constructor Detail |
public TinyVector(int i)
i - the initial capacity of the vector.public TinyVector(TinyVector src)
src - the vector to be copied.| Method Detail |
public int indexOf(java.lang.Object obj,
int i)
i, and testing for equality using
the equals method.
obj - an object.i - the non-negative index to start searching from.
-1 if the object is not
found.
java.lang.IndexOutOfBoundsException - if i is negative.
public int lastIndexOf(java.lang.Object obj,
int i)
obj - the desired component.i - the index to start searching from.
-1 if the object is not
found.
java.lang.IndexOutOfBoundsException - if i is greater
than or equal to the current size of this vector.public int removeElementAt(int i)
i.
i - the index of the object to remove.
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.
public int insertElementAt(java.lang.Object obj,
int i)
i.
obj - the object to insert.i - where to insert the object.
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.public void addElement(java.lang.Object obj)
obj - the object to be added.
|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||