public abstract class ConfigNodeBuilder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<FiberId,ConfigAttribute<?>> |
attributes |
protected java.lang.String |
comment |
protected java.lang.String |
name |
protected ConfigTree |
parent |
| Constructor and Description |
|---|
ConfigNodeBuilder(ConfigTree parent,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract ConfigNode |
build() |
<A> ConfigNodeBuilder |
withAttribute(FiberId attribute,
java.lang.Class<A> type,
A defaultValue) |
ConfigNodeBuilder |
withComment(java.lang.String comment)
Sets the
ConfigNode's comment. |
ConfigNodeBuilder |
withName(java.lang.String name)
Sets the
ConfigNode's name. |
@Nullable protected ConfigTree parent
@Nullable protected java.lang.String name
@Nullable protected java.lang.String comment
protected java.util.Map<FiberId,ConfigAttribute<?>> attributes
public ConfigNodeBuilder(@Nullable
ConfigTree parent,
@Nullable
java.lang.String name)
public ConfigNodeBuilder withName(java.lang.String name)
ConfigNode's name.name - the namethis builderConfigTree.lookup(java.lang.String)public ConfigNodeBuilder withComment(java.lang.String comment)
ConfigNode's comment.
If null, or if this method is never called, the ConfigNode will not have a comment.
An empty comment (non null, but only consisting of whitespace) will be serialised.
comment - the commentthis builderpublic <A> ConfigNodeBuilder withAttribute(FiberId attribute, java.lang.Class<A> type, A defaultValue)
public abstract ConfigNode build()