public class Configuration extends Object implements Serializable, Cloneable
| 限定符和类型 | 字段和说明 |
|---|---|
protected HashMap<String,Object> |
confData
Stores the concrete key/value pairs of this configuration object.
|
| 构造器和说明 |
|---|
Configuration()
Creates a new empty configuration.
|
Configuration(Configuration other)
Creates a new configuration with the copy of the given configuration.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addAll(Configuration other) |
Configuration |
clone() |
boolean |
contains(ConfigOption<?> configOption)
Checks whether there is an entry for the given config option.
|
boolean |
equals(Object obj) |
static Configuration |
fromMap(Map<String,String> map)
Creates a new configuration that is initialized with the options of the given map.
|
<T> T |
get(ConfigOption<T> option) |
Set<String> |
getKeys() |
<T> Optional<T> |
getOptional(ConfigOption<T> option) |
int |
hashCode() |
Set<String> |
keySet()
Returns the keys of all key/value pairs stored inside this configuration object.
|
<T> boolean |
remove(ConfigOption<T> configOption)
Removes given config option from the configuration.
|
<T> Configuration |
set(ConfigOption<T> option,
T value) |
Map<String,String> |
toMap() |
String |
toString() |
public Configuration()
public Configuration(Configuration other)
other - The configuration to copy the entries from.public static Configuration fromMap(Map<String,String> map)
public void addAll(Configuration other)
public Configuration clone()
public boolean contains(ConfigOption<?> configOption)
configOption - The configuration optionpublic <T> T get(ConfigOption<T> option)
public <T> Optional<T> getOptional(ConfigOption<T> option)
public <T> Configuration set(ConfigOption<T> option, T value)
public Set<String> keySet()
public <T> boolean remove(ConfigOption<T> configOption)
T - Type of the config optionconfigOption - config option to removeCopyright © 2025 The Apache Software Foundation. All rights reserved.