public boolean contains(E element) {
        for (int i = 0; i < this.size; i++) {
            if (array[i].equals(element)) {
                return true;
            }
        }
        return false;
    }