public void addElement(TreeValue value, int id) throws AlreadyExistException{
        if (root != null) {
            constructTree(root, value, id);
        } else {
            root = new TreeElement<>(value, id);
        }
    }