@Override protected Object clone() throws CloneNotSupportedException { LinkedListVector clone = new LinkedListVector(getVectorSize()); for (int i = 0; i < getVectorSize(); i++) { clone.setElement(i, this.getElement(i)); } return clone; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LinkedListVector)) return false; LinkedListVector that = (LinkedListVector) o; if (this.getVectorSize() != that.getVectorSize()) return false; for (int i = 0; i < getVectorSize(); i++) { if (this.getElement(i) != that.getElement(i)) return false; } return true; }