public static class BasicConfigurableObject.BasicConfigurationSupport extends java.lang.Object implements Configurable.ConfigurationSupport
Constructor and Description |
---|
BasicConfigurationSupport() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<ConfigKey<?>> |
findKeys(<any> filter)
Deprecated.
|
java.util.Set<ConfigKey<?>> |
findKeysDeclared(<any> filter)
see
ConfigMap#findKeysDeclared(Predicate) |
java.util.Set<ConfigKey<?>> |
findKeysPresent(<any> filter)
see
ConfigMap#findKeysPresent(Predicate) |
<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.
|
public <T> T get(ConfigKey<T> key)
Configurable.ConfigurationSupport
get
in interface Configurable.ConfigurationSupport
public <T> T get(ConfigKey.HasConfigKey<T> key)
get
in interface Configurable.ConfigurationSupport
#get(ConfigKey)}
public <T> T set(ConfigKey<T> key, T val)
Configurable.ConfigurationSupport
set
in interface Configurable.ConfigurationSupport
public <T> T set(ConfigKey.HasConfigKey<T> key, T val)
set
in interface Configurable.ConfigurationSupport
#set(ConfigKey, Object)}
public <T> T set(ConfigKey<T> key, Task<T> val)
Configurable.ConfigurationSupport
Configurable.getConfig(ConfigKey)
will execute the task, and block until the task completes.set
in interface Configurable.ConfigurationSupport
public <T> T set(ConfigKey.HasConfigKey<T> key, Task<T> val)
set
in interface Configurable.ConfigurationSupport
#set(ConfigKey, Task)}
@Deprecated public java.util.Set<ConfigKey<?>> findKeys(<any> filter)
findKeys
in interface Configurable.ConfigurationSupport
public java.util.Set<ConfigKey<?>> findKeysDeclared(<any> filter)
Configurable.ConfigurationSupport
ConfigMap#findKeysDeclared(Predicate)
findKeysDeclared
in interface Configurable.ConfigurationSupport
public java.util.Set<ConfigKey<?>> findKeysPresent(<any> filter)
Configurable.ConfigurationSupport
ConfigMap#findKeysPresent(Predicate)
findKeysPresent
in interface Configurable.ConfigurationSupport