/** * @param key The name of the sub-configuration to store the value in * @param value The value to store for the given sub-configuration * @return This config, for chaining */ public MutableConfig set(String key, String value) { MutableConfig config = subConfig(key); if (value == null) { if (config != null) removeSubConfig(config); } else { if (config == null) { config = new MutableConfig(key); addSubConfig(config); } config.setValue(value); } return this; }