/** * Returns the element at the given position. * * @param index the element's index * @return the element with the given index */ public final E elementAt(int index) { return get(index); }
/** * Returns the first element of the vector. * * @return the first element of the vector */ public final E firstElement() { return get(0); }
/** * Returns the element at the given position. * * @param index the element's index * @return the element with the given index */ public final E elementAt(int index) { return get(index); }
/** * Returns the first element of the vector. * * @return the first element of the vector */ public final E firstElement() { return get(0); }
/** * Returns the last element of the vector. * * @return the last element of the vector */ public final E lastElement() { return get(size() - 1); }
/** * Returns the last element of the vector. * * @return the last element of the vector */ public final E lastElement() { return get(size() - 1); }
downSampled.add(tmpV.get(index));
/** * 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; }