/** * Sets the element at the given index. * * @param element the element to be put into the vector * @param index the index at which the element is to be placed */ public final void setElementAt(E element, int index) { set(index, element); }
/** * Sets the element at the given index. * * @param element the element to be put into the vector * @param index the index at which the element is to be placed */ public final void setElementAt(E element, int index) { set(index, element); }
/** * Clones the vector and shallow copies all its elements. The elements have to * implement the Copyable interface. * * @return the new vector */ public final FastVector<E> copyElements() { FastVector<E> copy = copy(); for (int i = 0; i < size(); i++) { copy.set(i, Utils.<E> cast(((Copyable) get(i)).copy())); } return copy; }
/** * Clones the vector and shallow copies all its elements. The elements have to * implement the Copyable interface. * * @return the new vector */ public final FastVector<E> copyElements() { FastVector<E> copy = copy(); for (int i = 0; i < size(); i++) { copy.set(i, Utils.<E> cast(((Copyable) get(i)).copy())); } return copy; }