- 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.BuilderaddList(ConfigNode.ListNode list)Adds List node to the list.ListNodeBuilderImpladdNode(ConfigNode node)Adds new element into the list.ConfigNode.ListNode.BuilderaddObject(ConfigNode.ObjectNode object)Adds Object node to the list.ConfigNode.ListNode.BuilderaddValue(ConfigNode.ValueNode value)Adds String value to the list.io.helidon.config.ListNodeImplbuild()Build the instance from this builder.protected Integerid(AbstractNodeBuilderImpl.MergingKey key)Returns id computed from key.protected MergeableNodemember(Integer index)Returns member instance associated with specified id.protected voidmerge(Integer index, MergeableNode node)Merges a member of specified id with specified node.StringtoString()protected voidupdate(Integer index, MergeableNode node)Updates/replaces a member of specified id by specified node.ListNodeBuilderImplvalue(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:
valuein interfaceConfigNode.ListNode.Builder- Parameters:
value- value to set- Returns:
- modified builder
-
id
protected Integer id(AbstractNodeBuilderImpl.MergingKey key)
Description copied from class:AbstractNodeBuilderImplReturns id computed from key.- Specified by:
idin 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:AbstractNodeBuilderImplReturns member instance associated with specified id.- Specified by:
memberin 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:AbstractNodeBuilderImplUpdates/replaces a member of specified id by specified node.- Specified by:
updatein classAbstractNodeBuilderImpl<Integer,ConfigNode.ListNode.Builder>- Parameters:
index- member idnode- new node
-
merge
protected void merge(Integer index, MergeableNode node)
Description copied from class:AbstractNodeBuilderImplMerges a member of specified id with specified node.- Specified by:
mergein 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.BuilderAdds String value to the list.- Specified by:
addValuein 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.BuilderAdds Object node to the list.- Specified by:
addObjectin 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.BuilderAdds List node to the list.- Specified by:
addListin interfaceConfigNode.ListNode.Builder- Parameters:
list- list node- Returns:
- modified builder
-
build
public io.helidon.config.ListNodeImpl build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<ConfigNode.ListNode>- Returns:
- instance of the built type
-
-