public class ConfigGroupImpl extends ConfigNodeImpl implements ConfigGroup
ConfigGroup| Constructor and Description |
|---|
ConfigGroupImpl()
Creates a new
ConfigGroup without a name or comment. |
ConfigGroupImpl(java.lang.String name,
java.lang.String comment)
Creates a new
ConfigGroup with the provided name and comment. |
ConfigGroupImpl(java.lang.String name,
java.lang.String comment,
java.util.Map<java.lang.String,ConfigNode> items,
boolean serializeSeparately)
Creates a new
ConfigGroup. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ConfigNode> |
getItems()
Returns a collection of this group'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.
|
getComment, getName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamebuildergetCommentpublic ConfigGroupImpl(java.lang.String name,
@Nullable
java.lang.String comment,
@Nonnull
java.util.Map<java.lang.String,ConfigNode> items,
boolean serializeSeparately)
ConfigGroup.name - the name for this ConfigGroupImplcomment - the comment for this ConfigGroupImplitems - the node's itemsserializeSeparately - whether or not this node should be serialised separately. If true, it will be ignored during serialisation.public ConfigGroupImpl(@Nonnull
java.lang.String name,
@Nullable
java.lang.String comment)
ConfigGroup with the provided name and comment.
This node will not be serialised separately.
name - the name for this ConfigGroupImplcomment - the comment for this ConfigGroupImplConfigGroupImplpublic ConfigGroupImpl()
ConfigGroup without a name or comment.
This node will not be serialised separately.
ConfigGroupImpl@Nonnull public java.util.Collection<ConfigNode> getItems()
ConfigGroupThe returned collection is unmodifiable, and guaranteed not to have two nodes with the same name.
getItems in interface ConfigGroupgetItems in interface ConfigTree@Nullable public ConfigNode lookup(java.lang.String name)
ConfigGroup The node returned for a given name is always the same.
lookup in interface ConfigGrouplookup in interface ConfigTreename - The name of the child to look fornullpublic boolean isSerializedSeparately()
ConfigGrouptrue 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 ConfigGrouptrue if this node should be serialized separately, and false otherwise