public class ConfigBranchImpl extends ConfigNodeImpl implements ConfigBranch
ConfigBranch| Constructor and Description |
|---|
ConfigBranchImpl()
Creates a new
ConfigBranch without a name or comment. |
ConfigBranchImpl(java.lang.String name,
java.lang.String comment)
Creates a new
ConfigBranch with the provided name and comment. |
ConfigBranchImpl(java.lang.String name,
java.lang.String comment,
java.util.Collection<ConfigNode> items,
boolean serializeSeparately)
Creates a new
ConfigBranch. |
| Modifier and Type | Method and Description |
|---|---|
NodeCollection |
getItems()
Returns a collection of this branch's children.
|
boolean |
isSerializedSeparately()
Returns
true if this node should be serialized separately from its parent. |
ConfigNode |
lookup(java.lang.String name)
Tries to find a child in this group by name.
|
attachTo, detach, getAttributes, getAttributeValue, getComment, getName, getOrCreateAttribute, getParent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamebuilder, builderattachTo, detach, getAttributes, getAttributeValue, getOrCreateAttribute, getParentgetCommentpublic ConfigBranchImpl(java.lang.String name,
@Nullable
java.lang.String comment,
@Nonnull
java.util.Collection<ConfigNode> items,
boolean serializeSeparately)
ConfigBranch.name - the name for this ConfigBranchImplcomment - the comment for this ConfigBranchImplitems - the node's itemsserializeSeparately - whether or not this node should be serialised separately. If true, it will be ignored during serialisation.public ConfigBranchImpl(@Nonnull
java.lang.String name,
@Nullable
java.lang.String comment)
ConfigBranch with the provided name and comment.
This node will not be serialised separately.
name - the name for this ConfigBranchImplcomment - the comment for this ConfigBranchImplpublic ConfigBranchImpl()
ConfigBranch without a name or comment.
This node will not be serialised separately.
@Nonnull public NodeCollection getItems()
ConfigBranchThe returned collection is guaranteed not to have two nodes with the same name.
getItems in interface ConfigBranchgetItems in interface ConfigTreeNodeOperations@Nullable public ConfigNode lookup(java.lang.String name)
ConfigBranch The node returned for a given name is always the same.
lookup in interface ConfigBranchlookup in interface ConfigTreename - The name of the child to look fornullpublic boolean isSerializedSeparately()
ConfigBranchtrue if this node should be serialized separately from its parent.
If a node is serialized separately, it should not appear in the serialized representation of its ancestors. This property should be ignored if this node is the root of the currently serialised tree.
isSerializedSeparately in interface ConfigBranchtrue if this node should be serialized separately, and false otherwise