public boolean hasPrefix(CompoundName prefix) {
        if (prefix.size() > this.size()) return false;

        int prefixLength = prefix.name.length();
        if (prefixLength == 0)
            return true;

        if (name.length() > prefixLength && name.charAt(prefixLength) != '.')
            return false;

        return name.startsWith(prefix.name);
    }
Returns whether the given name is a prefix of this.
Prefixes are taken on the component, not character level, so
"a" is a prefix of "a.b", but not a prefix of "ax.b
container-core/src/main/java/com/yahoo/processing/request/CompoundName.java