public interface ConfigBranch extends ConfigTree, ConfigNode, Commentable
A branch may represent an entire config tree, or a subtree grouping further configuration items.
ConfigTreeBuilder| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ConfigNode> |
getItems()
Returns a collection of this group's children.
|
java.lang.String |
getName()
Returns this node's name.
|
default 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.
|
buildergetComment@Nullable java.lang.String getName()
If this node is the root of a config tree, it may not have a name.
In this case, this method returns null.
getName in interface ConfigNodenull if it does not have any.@Nullable ConfigNode lookup(java.lang.String name)
The node returned for a given name is always the same.
lookup in interface ConfigTreename - The name of the child to look fornull@Nonnull java.util.Collection<ConfigNode> getItems()
The returned collection is unmodifiable, and guaranteed not to have two nodes with the same name.
getItems in interface ConfigTreedefault boolean isSerializedSeparately()
true 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.
true if this node should be serialized separately, and false otherwise