public void deleteElement(ValueType value) throws WrongActionException {
        if (exist(value)) {
            SetElement<ValueType> previous = head;
            SetElement<ValueType> current = head.getNext();
            if (previous.getValue() == value) {
                head = current;
            } else {
                while (current.getValue() != value) {
                    previous = current;
                    current = current.getNext();
                }
                previous.connectNext(current.getNext());
            }
            amount--;
        } else {
            throw new WrongActionException("U wanna delete an element which doesn't exist");
        }
    }