public interface EditableConfiguration extends Configuration
Modifier and Type | Interface and Description |
---|---|
static class |
EditableConfiguration.Modification |
static interface |
EditableConfiguration.ModificationListener |
static class |
EditableConfiguration.ModificationType |
Modifier and Type | Method and Description |
---|---|
void |
addModificationListener(EditableConfiguration.ModificationListener listener)
Adds a new modification listener to this configuration.
|
void |
remove(java.lang.String name)
Removes the value of the given field.
|
void |
removeModificationListener(EditableConfiguration.ModificationListener listener)
Removes a modification listener from this configuration.
|
default void |
rename(java.lang.String oldName,
java.lang.String newName)
Renames the field with the given name to the new name.
|
default void |
set(java.lang.String name,
java.lang.Object value)
Sets the value at the given name to the new value.
|
void |
setArray(java.lang.String name,
ConfigurationArray value)
Sets the value at the given name to the new value.
|
void |
setBoolean(java.lang.String name,
boolean value)
Sets the value at the given name to the new value.
|
void |
setInner(java.lang.String name,
Configuration value)
Sets the value at the given name to the new value.
|
void |
setNumber(java.lang.String name,
java.lang.Number value)
Sets the value at the given name to the new value.
|
void |
setString(java.lang.String name,
java.lang.String value)
Sets the value at the given name to the new value.
|
get, getArray, getBoolean, getInner, getNumber, getProperties, getRawData, getString, hasArray, hasBoolean, hasInner, hasNumber, hasString, tryGet, tryGetArray, tryGetBoolean, tryGetInner, tryGetNumber, tryGetString
void setNumber(java.lang.String name, java.lang.Number value)
name
- The name of the property.value
- The value to set.void setBoolean(java.lang.String name, boolean value)
name
- The name of the property.value
- The value to set.void setString(java.lang.String name, java.lang.String value)
name
- The name of the property.value
- The value to set.void setArray(java.lang.String name, ConfigurationArray value)
name
- The name of the property.value
- The value to set.void setInner(java.lang.String name, Configuration value)
name
- The name of the property.value
- The value to set.default void set(java.lang.String name, java.lang.Object value)
name
- The name of the property.value
- The value to set. Must be of a type supported by a set* method.default void rename(java.lang.String oldName, java.lang.String newName)
oldName
- The old name of the field.newName
- The new name of the field. May overwrite an existing field.void remove(java.lang.String name)
name
- The name of the field.void addModificationListener(EditableConfiguration.ModificationListener listener)
listener
- The listener to be notified when the configuration is modified.void removeModificationListener(EditableConfiguration.ModificationListener listener)
listener
- The listener to not be notified when the configuration is modified anymore.