Returns the element at the specified location in this vector. @param location the index of the element to return in this vector. @return the element at the specified location. @throws ArrayIndexOutOfBoundsException if location < 0 || location >= size(). @see #size
(int location)
| 298 | * @see #size |
| 299 | */ |
| 300 | @SuppressWarnings("unchecked") |
| 301 | public synchronized E elementAt(int location) { |
| 302 | if (location < elementCount) { |
| 303 | return (E) elementData[location]; |
| 304 | } |
| 305 | throw new ArrayIndexOutOfBoundsException(location); |
| 306 | } |
| 307 | |
| 308 | /** |
| 309 | * Returns an enumeration on the elements of this vector. The results of the |
no outgoing calls