Package org.spongepowered.configurate
Interface CommentedConfigurationNodeIntermediary<N extends CommentedConfigurationNodeIntermediary<N>>
-
- Type Parameters:
N
- self type
- All Superinterfaces:
ConfigurationNode
,ScopedConfigurationNode<N>
- All Known Subinterfaces:
AttributedConfigurationNode
,CommentedConfigurationNode
public interface CommentedConfigurationNodeIntermediary<N extends CommentedConfigurationNodeIntermediary<N>> extends ScopedConfigurationNode<N>
Intermediate interface for different types of commented configuration nodes.- Since:
- 4.0.0
-
-
Field Summary
-
Fields inherited from interface org.spongepowered.configurate.ConfigurationNode
NUMBER_DEF
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable String
comment()
Gets the current value for the comment.N
comment(@Nullable String comment)
Sets the comment for this configuration node.N
commentIfAbsent(String comment)
Set a comment on this node if it does not presently have a comment.-
Methods inherited from interface org.spongepowered.configurate.ConfigurationNode
empty, get, get, get, get, get, get, get, get, get, getBoolean, getBoolean, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getList, getList, getList, getList, getList, getList, getLong, getLong, getString, getString, hasChild, hasChild, hint, isList, isMap, key, options, ownHint, ownHints, path, raw, rawScalar, removeChild, virtual, visit, visit, visit, visit
-
Methods inherited from interface org.spongepowered.configurate.ScopedConfigurationNode
act, appendListNode, childrenList, childrenMap, copy, from, hint, mergeFrom, node, node, parent, raw, self, set, set, set, set, setList, setList, toListCollector, toListCollector, toMapCollector, toMapCollector
-
-
-
-
Method Detail
-
comment
@Nullable String comment()
Gets the current value for the comment.If the comment contains multiple lines, the lines will be split by \n
- Returns:
- the configuration's current comment
- Since:
- 4.0.0
-
comment
N comment(@Nullable String comment)
Sets the comment for this configuration node.- Parameters:
comment
- the comment to set. Line breaks should be represented as LFs (\n)- Returns:
- this node
- Since:
- 4.0.0
-
commentIfAbsent
N commentIfAbsent(String comment)
Set a comment on this node if it does not presently have a comment.The provided comment must not be null, because setting a null comment would be a no-op
- Parameters:
comment
- the comment to set. Line breaks should be represented as LFs (\n)- Returns:
- this node
- Since:
- 4.0.0
-
-