@Beta
public static interface Configurable.ConfigurationSupport
Modifier and Type | Method and Description |
---|---|
<T> T |
get(ConfigKey.HasConfigKey<T> key) |
<T> T |
get(ConfigKey<T> key)
Gets the given configuration value for this entity, in the following order of precedence:
value (including null) explicitly set on the entity
value (including null) explicitly set on an ancestor (inherited)
a default value (including null) on the best equivalent static key of the same name declared on the entity
(where best equivalence is defined as preferring a config key which extends another,
as computed in EntityDynamicType.getConfigKeys)
a default value (including null) on the key itself
null
|
<T> T |
set(ConfigKey.HasConfigKey<T> key,
T val) |
<T> T |
set(ConfigKey.HasConfigKey<T> key,
Task<T> val) |
<T> T |
set(ConfigKey<T> key,
T val)
Sets the config to the given value.
|
<T> T |
set(ConfigKey<T> key,
Task<T> val)
Sets the config to the value returned by the task.
|
<T> T get(ConfigKey<T> key)
<T> T get(ConfigKey.HasConfigKey<T> key)
#getConfig(ConfigKey)}
<T> T set(ConfigKey<T> key, T val)
<T> T set(ConfigKey.HasConfigKey<T> key, T val)
#setConfig(HasConfigKey, Object)}
<T> T set(ConfigKey<T> key, Task<T> val)
#getConfig(ConfigKey)
will execute the task, and block until the task completes.#setConfig(ConfigKey, Object)}
<T> T set(ConfigKey.HasConfigKey<T> key, Task<T> val)
#setConfig(ConfigKey, Task)}