public boolean isChildOf(Path parent) {
        return toString().startsWith(parent.toString()) && this.elements.size() -1 == parent.elements.size();
    }
Returns whether this path is an immediate child of the given path
vespajlib/src/main/java/com/yahoo/path/Path.java