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