| Modifier and Type | Method and Description |
|---|---|
Element |
Config.getOrNull(String key)
Attempt to retrieve an element by key efficiently by not wrapping for type safety if it is missing; best used
in situations where temporary object creation overhead is not acceptable but the value is not required
|
default Element |
Config.getOrThrow(String key)
Attempt to retrieve an element by key without needing conditional logic to interpret the result; best used when
a default has been set for the key or when the program must have a value to operate correctly.
|
| Modifier and Type | Method and Description |
|---|---|
default Optional<Element> |
Config.get(String key)
Attempt to retrieve an element by key in a type safe manner that allows functional chaining; best used when a
key is not required and the program needs to branch based on its presence
|
SortedMap<String,Element> |
Config.getAll()
Returns a snapshot of the current elements inside this configuration; if there were multiple descriptors used to
build a compound configuration the map will be flattened to show only the values that would be returned by
get queries. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Element.hasEqualValue(Element other) |
| Modifier and Type | Method and Description |
|---|---|
void |
Config.addListener(Consumer<Element> listener)
Places a change listener into the system.
|
void |
Config.addTrigger(String key,
Consumer<Element> trigger)
Places a listener for a single key into the system.
|
void |
Config.removeListener(Consumer<Element> listener)
Removes a change listener from the system.
|
void |
Config.removeTrigger(String key,
Consumer<Element> trigger)
Removes a listener for a single key from the system.
|
Copyright © 2018. All rights reserved.