Adds the specified object at the end of this vector. @param object the object to add to the vector.
(E object)
| 214 | * the object to add to the vector. |
| 215 | */ |
| 216 | public synchronized void addElement(E object) { |
| 217 | if (elementCount == elementData.length) { |
| 218 | growByOne(); |
| 219 | } |
| 220 | elementData[elementCount++] = object; |
| 221 | modCount++; |
| 222 | } |
| 223 | |
| 224 | /** |
| 225 | * Returns the number of elements this vector can hold without growing. |