private static List<String> parse(String s) {
        ArrayList<String> l = null;
        int p = 0;
        final int m = s.length();
        for (int i = 0; i < m; i++) {
            if (s.charAt(i) == '.') {
                if (l == null) l = new ArrayList<>(8);
                l.add(s.substring(p, i));
                p = i + 1;
            }
        }
        if (p == 0) {
            if (l == null) return List.of(s);
            l.add(s);
        } else if (p < m) {
            l.add(s.substring(p, m));
        } else {
            throw new IllegalArgumentException("'" + s + "' is not a legal compound name. Names can not end with a dot.");
        }
        return l;
    }
Constructs this from a name with already parsed compounds.
Private to avoid creating names with inconsistencies.

@param name the string representation of the compounds
@param compounds the compounds of this name
container-core/src/main/java/com/yahoo/processing/request/CompoundName.java