java.lang.Object
io.helidon.config.AbstractNodeBuilderImpl<String,ConfigNode.ObjectNode.Builder>
io.helidon.config.ObjectNodeBuilderImpl
- All Implemented Interfaces:
ConfigNode.ObjectNode.Builder
public class ObjectNodeBuilderImpl
extends AbstractNodeBuilderImpl<String,ConfigNode.ObjectNode.Builder>
implements ConfigNode.ObjectNode.Builder
Implementation of
ConfigNode.ObjectNode.Builder
.
This class is public
for the time being, though it should not be.-
Nested Class Summary
Nested classes/interfaces inherited from class io.helidon.config.AbstractNodeBuilderImpl
AbstractNodeBuilderImpl.MergingKey
-
Constructor Summary
ConstructorDescriptionObjectNodeBuilderImpl
(Function<String, String> tokenResolver) Initialize object builder. -
Method Summary
Modifier and TypeMethodDescriptionaddList
(String key, ConfigNode.ListNode list) Sets List node associated with specifiedkey
.addNode
(String name, ConfigNode node) Sets new member into the map.addObject
(String key, ConfigNode.ObjectNode object) Sets Object node associated with specifiedkey
.addValue
(String key, ConfigNode.ValueNode value) Sets String value associated with specifiedkey
.build()
Build new instance ofConfigNode.ObjectNode
.static ObjectNodeBuilderImpl
create()
Create a new builder instance.static ObjectNodeBuilderImpl
create
(Map<String, ConfigNode> members) Creates new instance of the builder initialized from original map of members.static ObjectNodeBuilderImpl
Creates new instance of the builder initialized from original map of members.protected String
Returns id computed from key.protected MergeableNode
Returns member instance associated with specified id.protected void
merge
(String name, MergeableNode node) Merges a member of specified id with specified node.toString()
protected void
update
(String name, MergeableNode node) Updates/replaces a member of specified id by specified node.Configure direct value of this node.Methods inherited from class io.helidon.config.AbstractNodeBuilderImpl
deepMerge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.config.spi.ConfigNode.ObjectNode.Builder
addValue
-
Constructor Details
-
ObjectNodeBuilderImpl
Initialize object builder.- Parameters:
tokenResolver
- a token resolver
-
-
Method Details
-
create
Create a new builder instance.- Returns:
- a new builder
-
create
Creates new instance of the builder initialized from original map of members.- Parameters:
members
- initial members- Returns:
- new builder instance
-
create
public static ObjectNodeBuilderImpl create(Map<String, ConfigNode> members, Function<String, String> resolveTokenFunction) Creates new instance of the builder initialized from original map of members.- Parameters:
members
- initial membersresolveTokenFunction
- a function resolving key token- Returns:
- new builder instance
-
addNode
Sets new member into the map.- Specified by:
addNode
in interfaceConfigNode.ObjectNode.Builder
- Parameters:
name
- node namenode
- new node- Returns:
- modified builder
-
id
Description copied from class:AbstractNodeBuilderImpl
Returns id computed from key.- Specified by:
id
in classAbstractNodeBuilderImpl<String,
ConfigNode.ObjectNode.Builder> - Parameters:
key
- key to be used to extract id from- Returns:
- id computed from key
-
member
Description copied from class:AbstractNodeBuilderImpl
Returns member instance associated with specified id.- Specified by:
member
in classAbstractNodeBuilderImpl<String,
ConfigNode.ObjectNode.Builder> - Parameters:
name
- member id- Returns:
- member instance associated with specified id.
-
update
Description copied from class:AbstractNodeBuilderImpl
Updates/replaces a member of specified id by specified node.- Specified by:
update
in classAbstractNodeBuilderImpl<String,
ConfigNode.ObjectNode.Builder> - Parameters:
name
- member idnode
- new node
-
merge
Description copied from class:AbstractNodeBuilderImpl
Merges a member of specified id with specified node.- Specified by:
merge
in classAbstractNodeBuilderImpl<String,
ConfigNode.ObjectNode.Builder> - Parameters:
name
- member idnode
- new node
-
value
Configure direct value of this node.- Specified by:
value
in interfaceConfigNode.ObjectNode.Builder
- Parameters:
value
- the value- Returns:
- modified builder
-
addValue
Description copied from interface:ConfigNode.ObjectNode.Builder
Sets String value associated with specifiedkey
.- Specified by:
addValue
in interfaceConfigNode.ObjectNode.Builder
- Parameters:
key
- member keyvalue
- string value- Returns:
- modified builder
-
addObject
Description copied from interface:ConfigNode.ObjectNode.Builder
Sets Object node associated with specifiedkey
.- Specified by:
addObject
in interfaceConfigNode.ObjectNode.Builder
- Parameters:
key
- member keyobject
- object node- Returns:
- modified builder
-
addList
Description copied from interface:ConfigNode.ObjectNode.Builder
Sets List node associated with specifiedkey
.- Specified by:
addList
in interfaceConfigNode.ObjectNode.Builder
- Parameters:
key
- member keylist
- list node- Returns:
- modified builder
-
build
Description copied from interface:ConfigNode.ObjectNode.Builder
Build new instance ofConfigNode.ObjectNode
.- Specified by:
build
in interfaceConfigNode.ObjectNode.Builder
- Returns:
- new instance of
ConfigNode.ObjectNode
.
-
toString
-