class ConfigValue implements Serializable {

    ConfigValue getPrefix(String prefix) {
        ImmutableMap<ImmutableSet<String>, String> filteredPrefixedValues = getFilteredPrefixedValues(prefix);
        String currentValue = getPrefixValue(prefix, filteredPrefixedValues);

        ImmutableMap.Builder<ImmutableSet<String>, String> prefixedValues = ImmutableMap.builder();
        filteredPrefixedValues.forEach((prefixes, value) -> {
            ImmutableSet<String> updatedPrefixes = removePrefix(prefix, prefixes);
            if (!updatedPrefixes.isEmpty()) {
                prefixedValues.put(updatedPrefixes, value);
            }
        });

        return new ConfigValue(currentValue, prefixedValues.build());
    }

      ConfigValue(String currentValue, ImmutableMap<ImmutableSet<String>, String> prefixedValues);

}