public CompoundName set(int i, String name) {
        if (get(i).equals(name)) return this;
        List<String> newCompounds = new ArrayList<>(compounds);
        newCompounds.set(i, name);
        return new CompoundName(newCompounds);
    }
Returns a compound which have the name component at index i set to the given name.
As an optimization, if the given name == the name component at this index, this is returned.
container-core/src/main/java/com/yahoo/processing/request/CompoundName.java