public interface ConfigMap
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
asMapWithStringKeys()
returns a read-only map view which has string keys (corresponding to the config key names);
callers encouraged to use the typed keys (and so not use this method),
but in some compatibility areas having a Properties-like view is useful
|
java.util.Map<ConfigKey<?>,java.lang.Object> |
getAllConfig()
returns a map of all config keys to their raw (unresolved+uncoerced) contents
|
<T> T |
getConfig(ConfigKey.HasConfigKey<T> key) |
<T> T |
getConfig(ConfigKey.HasConfigKey<T> key,
T defaultValue)
Deprecated.
since 0.7.0; use
#getConfig(HasConfigKey) |
<T> T |
getConfig(ConfigKey<T> key) |
<T> T |
getConfig(ConfigKey<T> key,
T defaultValue)
Deprecated.
since 0.7.0; use
getConfig(ConfigKey) |
Maybe<java.lang.Object> |
getConfigRaw(ConfigKey<?> key,
boolean includeInherited)
returns the value stored against the given key,
not any default,
not resolved (and guaranteed non-blocking),
and not type-coerced.
|
java.lang.Object |
getRawConfig(ConfigKey<?> key)
Deprecated.
since 0.7.0 use
#getConfigRaw(ConfigKey) |
boolean |
isEmpty() |
int |
size() |
ConfigMap |
submap(com.google.common.base.Predicate<ConfigKey<?>> filter)
returns submap matching the given filter predicate; see ConfigPredicates for common predicates
|
<T> T getConfig(ConfigKey<T> key)
#getConfig(ConfigKey, Object), with default value as per the key, or null
<T> T getConfig(ConfigKey.HasConfigKey<T> key)
#getConfig(ConfigKey, Object), with default value as per the key, or null
@Deprecated <T> T getConfig(ConfigKey.HasConfigKey<T> key, T defaultValue)
#getConfig(HasConfigKey)
#getConfig(ConfigKey, Object), with provided default value if not set
@Deprecated <T> T getConfig(ConfigKey<T> key, T defaultValue)
getConfig(ConfigKey)
@Deprecated java.lang.Object getRawConfig(ConfigKey<?> key)
#getConfigRaw(ConfigKey)
#getConfigRaw(ConfigKey)
but returning null if not presentMaybe<java.lang.Object> getConfigRaw(ConfigKey<?> key, boolean includeInherited)
key
- key to look upincludeInherited
- for ConfigMap
instances which have an inheritance hierarchy,
whether to traverse it or not; has no effects where there is no inheritancejava.util.Map<ConfigKey<?>,java.lang.Object> getAllConfig()
ConfigMap submap(com.google.common.base.Predicate<ConfigKey<?>> filter)
java.util.Map<java.lang.String,java.lang.Object> asMapWithStringKeys()
int size()
boolean isEmpty()