class MutableConfigPropertiesImpl extends SimpleConfigProperties implements MutableConfigProperties
MutableConfigProperties
.Modifier and Type | Field and Description |
---|---|
private SimpleConfigProperties |
copy |
private int |
copyModifications |
private SimpleConfigProperties |
parent |
private int |
parentModifications |
EMPTY, KEY_SEPARATOR
Modifier | Constructor and Description |
---|---|
protected |
MutableConfigPropertiesImpl(String key)
The constructor.
|
protected |
MutableConfigPropertiesImpl(String key,
ConfigProperties copy,
ConfigProperties parent)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SimpleConfigProperties |
createChild(String key,
boolean create) |
String |
getValue() |
MutableConfigProperties |
inherit(ConfigProperties parentNode) |
void |
setChildValue(String key,
String value) |
void |
setValue(String value) |
protected void |
updateChildren()
Updates the child-nodes in case of a mutable copy node.
|
asSimple, composeKey, fromFlatMap, fromHierarchicalMap, getChild, getChild, getChild, getChild, getChildKeys, getChildValue, getChildValue, getNodeKey, getNodeModifications, getValue, getValue, getValueAsBoolean, isEmpty, ofFlatMap, ofFlatMap, ofHierarchicalMap, ofHierarchicalMap, toFlatMap, toFlatMap, toHierarchicalMap, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChild, getChild, getChildKeys, getChildValue, getChildValue, getValue, getValue, getValueAsBoolean, isEmpty, toFlatMap, toFlatMap, toHierarchicalMap
private final SimpleConfigProperties parent
private final SimpleConfigProperties copy
private int copyModifications
private int parentModifications
protected MutableConfigPropertiesImpl(String key)
key
- the hierarchical key of this ConfigProperties
-node.protected MutableConfigPropertiesImpl(String key, ConfigProperties copy, ConfigProperties parent)
key
- the hierarchical key of this ConfigProperties
-node.copy
- the ConfigProperties
-node to copy with inheritance
from the given parent
.parent
- the parent ConfigProperties
to inherit
from
or null
for none.protected void updateChildren()
SimpleConfigProperties
updateChildren
in class SimpleConfigProperties
public MutableConfigProperties inherit(ConfigProperties parentNode)
inherit
in interface ConfigProperties
inherit
in class SimpleConfigProperties
parentNode
- the parent ConfigProperties
to extend.ConfigProperties
with all children
and
value
(s) from this ConfigProperties
-tree and all children
and value
(s) inherited from the given parent
ConfigProperties
-tree if they are undefined in this tree.public String getValue()
getValue
in interface ConfigProperties
getValue
in class SimpleConfigProperties
ConfigProperties
-node. May be null
.public void setValue(String value)
setValue
in interface MutableConfigProperties
setValue
in class SimpleConfigProperties
value
- new value of SimpleConfigProperties.getValue()
.public void setChildValue(String key, String value)
setChildValue
in interface MutableConfigProperties
key
- the key of the child
where to set the value
. All
such children will be created if they do not yet exist.value
- the new value to set
.protected SimpleConfigProperties createChild(String key, boolean create)
createChild
in class SimpleConfigProperties
key
- the key segment of the child to create.create
- - true
to force creation, false
otherwise.null
.Copyright © 2014–2019 devon4j-Team. All rights reserved.