| Modifier and Type | Field and Description |
|---|---|
| protected int | m_blocksize
Size of blocks to allocate |
| protected int | m_firstFree
Number of ints in array |
| protected Object[] | m_map
Array of objects |
| protected int | m_mapSize
Size of array |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ObjectVector(int
Size of block to allocate blocksize)Construct a IntVector, using the given block size. |
| public | ObjectVector(int
Size of block to allocate blocksize, int increaseSize)Construct a IntVector, using the given block size. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public final void | addElements(Object
Object to add to the list value, int numberOfElements)Append several Object values onto the vector. |
| public final void | addElements(int
number of slots to append numberOfElements)Append several slots onto the vector, but do not set the values. |
| public Object | Returns: clone of current ObjectVectorOverrides java. Returns clone of current ObjectVector |
| public final boolean | |
| public final Object | |
| public final int | Returns: the index of the first occurrence of the object argument in this vector at position index or later in the vector; returns -1 if the object is not found.object to look for elem, int Index of where to begin search index)Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method. |
| public final int | Returns: the index of the first occurrence of the object argument in this vector at position index or later in the vector; returns -1 if the object is not found.object to look for elem)Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method. |
| public final void | insertElementAt(Object
Object to insert value, int Index of where to insert at)Inserts the specified object in this vector at the specified index. |
| public final int | Returns: the index of the first occurrence of the object argument in this vector at position index or later in the vector; returns -1 if the object is not found.Object to look for elem)Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method. |
| public final void | |
| public final boolean | Returns: True if the object was removed, false if it was not foundObject to remove from array s)Removes the first occurrence of the argument from this vector. |
| public final void | removeElementAt(int
index of where to remove an object i)Deletes the component at the specified index. |
| public final void | setElementAt(Object
object to set value, int Index of where to set the object index)Sets the component at the specified index of this vector to be the specified object. |
| public final void | |
| public final void | |
| public final int |
| m_blocksize | back to summary |
|---|---|
| protected int m_blocksize Size of blocks to allocate | |
| m_firstFree | back to summary |
|---|---|
| protected int m_firstFree Number of ints in array | |
| m_map | back to summary |
|---|---|
| protected Object[] m_map Array of objects | |
| m_mapSize | back to summary |
|---|---|
| protected int m_mapSize Size of array | |
| ObjectVector | back to summary |
|---|---|
| public ObjectVector() Default constructor. Note that the default block size is very small, for small lists. | |
| ObjectVector | back to summary |
|---|---|
| public ObjectVector(int blocksize) Construct a IntVector, using the given block size.
| |
| ObjectVector | back to summary |
|---|---|
| public ObjectVector(int blocksize, int increaseSize) Construct a IntVector, using the given block size.
| |
| ObjectVector | back to summary |
|---|---|
| public ObjectVector(ObjectVector v) Copy constructor for ObjectVector
| |
| addElement | back to summary |
|---|---|
| public final void addElement(Object value) Append an object onto the vector.
| |
| addElements | back to summary |
|---|---|
| public final void addElements(Object value, int numberOfElements) Append several Object values onto the vector.
| |
| addElements | back to summary |
|---|---|
| public final void addElements(int numberOfElements) Append several slots onto the vector, but do not set the values.
| |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Returns clone of current ObjectVector
| |
| contains | back to summary |
|---|---|
| public final boolean contains(Object s) Tell if the table contains the given Object.
| |
| elementAt | back to summary |
|---|---|
| public final Object elementAt(int i) Get the nth element.
| |
| indexOf | back to summary |
|---|---|
| public final int indexOf(Object elem, int index) Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
| |
| indexOf | back to summary |
|---|---|
| public final int indexOf(Object elem) Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
| |
| insertElementAt | back to summary |
|---|---|
| public final void insertElementAt(Object value, int at) Inserts the specified object in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.
| |
| lastIndexOf | back to summary |
|---|---|
| public final int lastIndexOf(Object elem) Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
| |
| removeAllElements | back to summary |
|---|---|
| public final void removeAllElements() Remove all elements objects from the list. | |
| removeElement | back to summary |
|---|---|
| public final boolean removeElement(Object s) Removes the first occurrence of the argument from this vector. If the object is found in this vector, each component in the vector with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously.
| |
| removeElementAt | back to summary |
|---|---|
| public final void removeElementAt(int i) Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously.
| |
| setElementAt | back to summary |
|---|---|
| public final void setElementAt(Object value, int index) Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded. The index must be a value greater than or equal to 0 and less than the current size of the vector.
| |
| setSize | back to summary |
|---|---|
| public final void setSize(int sz) Get the length of the list.
| |
| setToSize | back to summary |
|---|---|
| public final void setToSize(int size) | |
| size | back to summary |
|---|---|
| public final int size() Get the length of the list.
| |