public class SimpleCommentedConfigurationNode extends SimpleConfigurationNode implements CommentedConfigurationNode
NUMBER_DEF
Modifier | Constructor and Description |
---|---|
protected |
SimpleCommentedConfigurationNode(Object path,
SimpleConfigurationNode parent,
ConfigurationOptions options) |
Modifier and Type | Method and Description |
---|---|
protected SimpleCommentedConfigurationNode |
createNode(Object path) |
boolean |
equals(Object o) |
SimpleCommentedConfigurationNode |
getAppendedNode() |
List<? extends SimpleCommentedConfigurationNode> |
getChildrenList()
Return an immutable copy of the list of children this node is aware of
|
Map<Object,? extends SimpleCommentedConfigurationNode> |
getChildrenMap()
Return an immutable copy of the mapping from key to node of every child this node is aware of
|
Optional<String> |
getComment()
Gets the current value for the comment.
|
SimpleCommentedConfigurationNode |
getNode(Object... path)
Gets the node at the given (relative) path, possibly traversing multiple levels of nodes
|
SimpleCommentedConfigurationNode |
getParent()
Returns the current parent for this node.
|
int |
hashCode() |
SimpleCommentedConfigurationNode |
mergeValuesFrom(ConfigurationNode other)
Set all the values from the given node that are not present in this node
to their values in the provided node.
|
static SimpleCommentedConfigurationNode |
root() |
static SimpleCommentedConfigurationNode |
root(ConfigurationOptions options) |
SimpleCommentedConfigurationNode |
setComment(String comment)
Sets the comment for this configuration.
|
SimpleCommentedConfigurationNode |
setValue(Object value)
Set this node's value to the given value.
|
String |
toString() |
attachChild, attachIfNecessary, clear, getChild, getKey, getList, getList, getList, getList, getList, getOptions, getPath, getValue, getValue, getValue, getValue, getValue, getValue, hasListChildren, hasMapChildren, isVirtual, removeChild
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBoolean, getBoolean, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getKey, getList, getList, getList, getList, getList, getList, getLong, getLong, getOptions, getPath, getString, getString, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, hasListChildren, hasMapChildren, isVirtual, removeChild, setValue
protected SimpleCommentedConfigurationNode(Object path, SimpleConfigurationNode parent, ConfigurationOptions options)
public static SimpleCommentedConfigurationNode root()
public static SimpleCommentedConfigurationNode root(ConfigurationOptions options)
public Optional<String> getComment()
CommentedConfigurationNode
getComment
in interface CommentedConfigurationNode
public SimpleCommentedConfigurationNode setComment(String comment)
CommentedConfigurationNode
setComment
in interface CommentedConfigurationNode
comment
- The comment to set. Line breaks should be represented as LFs (\n)public SimpleCommentedConfigurationNode getParent()
ConfigurationNode
getParent
in interface CommentedConfigurationNode
getParent
in interface ConfigurationNode
getParent
in class SimpleConfigurationNode
protected SimpleCommentedConfigurationNode createNode(Object path)
createNode
in class SimpleConfigurationNode
public SimpleCommentedConfigurationNode setValue(Object value)
ConfigurationNode
Collection
or a Map
, it will be unwrapped into
the appropriate configuration node structuresetValue
in interface CommentedConfigurationNode
setValue
in interface ConfigurationNode
setValue
in class SimpleConfigurationNode
value
- The value to setpublic SimpleCommentedConfigurationNode mergeValuesFrom(ConfigurationNode other)
ConfigurationNode
mergeValuesFrom
in interface CommentedConfigurationNode
mergeValuesFrom
in interface ConfigurationNode
mergeValuesFrom
in class SimpleConfigurationNode
other
- The node to merge values frompublic SimpleCommentedConfigurationNode getNode(Object... path)
ConfigurationNode
getNode
in interface CommentedConfigurationNode
getNode
in interface ConfigurationNode
getNode
in class SimpleConfigurationNode
path
- The path to fetch the node atpublic List<? extends SimpleCommentedConfigurationNode> getChildrenList()
ConfigurationNode
getChildrenList
in interface CommentedConfigurationNode
getChildrenList
in interface ConfigurationNode
getChildrenList
in class SimpleConfigurationNode
public Map<Object,? extends SimpleCommentedConfigurationNode> getChildrenMap()
ConfigurationNode
getChildrenMap
in interface CommentedConfigurationNode
getChildrenMap
in interface ConfigurationNode
getChildrenMap
in class SimpleConfigurationNode
public SimpleCommentedConfigurationNode getAppendedNode()
getAppendedNode
in interface CommentedConfigurationNode
getAppendedNode
in interface ConfigurationNode
getAppendedNode
in class SimpleConfigurationNode
public boolean equals(Object o)
equals
in class SimpleConfigurationNode
public int hashCode()
hashCode
in class SimpleConfigurationNode
public String toString()
toString
in class SimpleConfigurationNode
Copyright © 2014–2017. All rights reserved.