code: @SuppressWarnings("unchecked")
    public void replaceInplace(final LNGVector<? extends T> other) {
      if (this == other)
        throw new IllegalArgumentException("cannot replace a vector in-place with itself");
      this.elements = (T[]) new Object[other.size()];
      for (int i = 0; i < other.size(); i++)
        this.elements[i] = other.get(i);
      this.size = other.size;
    }
docs: Replaces the contents of this vector with the contents of another vector in-place.
  @param other the other vector
  @throws IllegalArgumentException if you try to replace a vector with itself