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