See: Description
Interface | Description |
---|---|
ConfigurationObserver |
A
ConfigurationObserver observes changes made to a Configuration instance. |
Class | Description |
---|---|
Configuration |
A class to set and get configuration values.
|
This API includes the following:
Configuration
- The core class of this API that contains methods for storing and retrieving configuration values, among other things.ConfigurationObserver
- An interface that defines the contract for observers of a Configuration
instance.The following code snippet demonstrates how you can use this API:
Configuration configuration = new Configuration();
configuration.addConfigurationObserver((configuration0, id, oldObject, newObject) -> System.out.println(newObject));
configuration.setObject("A", true);
OptionalBoolean a = configuration.getBoolean("A");
OptionalBoolean b = configuration.getBoolean("B", false);