public boolean isPatternPresent(Tree.Node<String, Integer> parent, int count) {
        if (parent.getChildren().size() > 0) {
            if (this.text.length() >= count + 1) {
                String pattern = this.text.substring(count, count + 1);
                if (isInChildren(parent.getChildren(), pattern)) {
                    parent = getNodeWithSameDataAsPattern(parent.getChildren(), pattern);
                    count++;
                    isPatternPresent(parent, count);
                } else {
                    recursive = false;
                }
            } else {
                recursive = false;
            }
        }

        if (recursive) {
            return true;
        } else {
            return false;
        }
    }