java.lang.Object
io.helidon.config.AbstractNodeBuilderImpl<Integer,ConfigNode.ListNode.Builder>
io.helidon.config.ListNodeBuilderImpl
- All Implemented Interfaces:
Builder<ConfigNode.ListNode.Builder,
,ConfigNode.ListNode> ConfigNode.ListNode.Builder
,Supplier<ConfigNode.ListNode>
public class ListNodeBuilderImpl
extends AbstractNodeBuilderImpl<Integer,ConfigNode.ListNode.Builder>
implements ConfigNode.ListNode.Builder
Implementation of
ConfigNode.ListNode.Builder
.-
Nested Class Summary
Nested classes/interfaces inherited from class io.helidon.config.AbstractNodeBuilderImpl
AbstractNodeBuilderImpl.MergingKey
-
Constructor Summary
ConstructorDescriptionInitialize list builder.ListNodeBuilderImpl
(Function<String, String> resolveTokenFunctions) Initialize list builder. -
Method Summary
Modifier and TypeMethodDescriptionaddList
(ConfigNode.ListNode list) Adds List node to the list.addNode
(ConfigNode node) Adds new element into the list.addObject
(ConfigNode.ObjectNode object) Adds Object node to the list.addValue
(ConfigNode.ValueNode value) Adds String value to the list.io.helidon.config.ListNodeImpl
build()
Build the instance from this builder.protected Integer
Returns id computed from key.protected MergeableNode
Returns member instance associated with specified id.protected void
merge
(Integer index, MergeableNode node) Merges a member of specified id with specified node.toString()
protected void
update
(Integer index, MergeableNode node) Updates/replaces a member of specified id by specified node.Combine this list node with a value.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.ListNode.Builder
addValue
-
Constructor Details
-
ListNodeBuilderImpl
public ListNodeBuilderImpl()Initialize list builder. -
ListNodeBuilderImpl
Initialize list builder.- Parameters:
resolveTokenFunctions
- a token resolver
-
-
Method Details
-
addNode
Adds new element into the list.- Parameters:
node
- new node- Returns:
- modified builder
-
value
Combine this list node with a value.- Specified by:
value
in interfaceConfigNode.ListNode.Builder
- Parameters:
value
- value to set- Returns:
- modified builder
-
id
Description copied from class:AbstractNodeBuilderImpl
Returns id computed from key.- Specified by:
id
in classAbstractNodeBuilderImpl<Integer,
ConfigNode.ListNode.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<Integer,
ConfigNode.ListNode.Builder> - Parameters:
index
- 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<Integer,
ConfigNode.ListNode.Builder> - Parameters:
index
- member idnode
- new node
-
merge
Description copied from class:AbstractNodeBuilderImpl
Merges a member of specified id with specified node.- Specified by:
merge
in classAbstractNodeBuilderImpl<Integer,
ConfigNode.ListNode.Builder> - Parameters:
index
- member idnode
- new node
-
addValue
Description copied from interface:ConfigNode.ListNode.Builder
Adds String value to the list.- Specified by:
addValue
in interfaceConfigNode.ListNode.Builder
- Parameters:
value
- string value- Returns:
- modified builder
-
addObject
Description copied from interface:ConfigNode.ListNode.Builder
Adds Object node to the list.- Specified by:
addObject
in interfaceConfigNode.ListNode.Builder
- Parameters:
object
- object node- Returns:
- modified builder
-
addList
Description copied from interface:ConfigNode.ListNode.Builder
Adds List node to the list.- Specified by:
addList
in interfaceConfigNode.ListNode.Builder
- Parameters:
list
- list node- Returns:
- modified builder
-
build
public io.helidon.config.ListNodeImpl build()Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<ConfigNode.ListNode.Builder,
ConfigNode.ListNode> - Returns:
- instance of the built type
-
toString
-