public class RioConfig extends Object implements Serializable
ParserConfig
and WriterConfig
.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
protected ConcurrentMap<RioSetting<Object>,Object> |
settings
A map containing mappings from settings to their values.
|
Constructor and Description |
---|
RioConfig() |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(RioSetting<T> setting)
Return the value for a given
RioSetting or the default value if it
has not been set. |
<T> boolean |
isSet(RioSetting<T> setting)
Checks for whether a
RioSetting has been explicitly set by a user. |
<T> void |
set(RioSetting<T> setting,
T value)
Sets a
RioSetting to have a new value. |
void |
useDefaults()
Resets all settings back to their default values.
|
protected final ConcurrentMap<RioSetting<Object>,Object> settings
protected final org.slf4j.Logger log
public <T> T get(RioSetting<T> setting)
RioSetting
or the default value if it
has not been set.setting
- The RioSetting
to fetch a value for.public <T> void set(RioSetting<T> setting, T value)
RioSetting
to have a new value. If the value is null, the
parser setting is removed and the default will be used instead.setting
- The setting to set a new value for.value
- The value for the parser setting, or null to reset the parser
setting to use the default value.public <T> boolean isSet(RioSetting<T> setting)
RioSetting
has been explicitly set by a user.setting
- The setting to check for.public void useDefaults()
Copyright © 2001-2016 Aduna. All Rights Reserved.