Class CommentedNode<T>
java.lang.Object
com.github.siroshun09.configapi.core.node.CommentedNode<T>
- Type Parameters:
T
- a type of object
- All Implemented Interfaces:
CommentableNode<T>
,Node<T>
An implementation class of the
CommentableNode
to wrap the non-CommentableNode
node and attach the Comment
.-
Method Summary
Modifier and TypeMethodDescription@NotNull VisitResult
accept
(@NotNull NodeVisitor visitor) Accepts aNodeVisitor
for thisNode
.boolean
@NotNull Comment
Gets theComment
.boolean
Checks if thisCommentableNode
has theComment
.int
hashCode()
node()
Gets the wrappedNode
.void
setComment
(@Nullable Comment comment) Sets theComment
.toString()
@UnknownNullability T
value()
Gets an object which thisNode
holdsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.siroshun09.configapi.core.node.CommentableNode
getCommentOrNull
Methods inherited from interface com.github.siroshun09.configapi.core.node.Node
asOptional, hasValue
-
Method Details
-
value
Description copied from interface:Node
Gets an object which thisNode
holds -
node
Gets the wrappedNode
.- Returns:
- the wrapped
Node
-
hasComment
public boolean hasComment()Description copied from interface:CommentableNode
Checks if thisCommentableNode
has theComment
.- Specified by:
hasComment
in interfaceCommentableNode<T>
- Returns:
true
if thisCommentableNode
has theComment
, otherwisefalse
-
getComment
Description copied from interface:CommentableNode
Gets theComment
.- Specified by:
getComment
in interfaceCommentableNode<T>
- Returns:
- the
Comment
-
setComment
Description copied from interface:CommentableNode
Sets theComment
.- Specified by:
setComment
in interfaceCommentableNode<T>
- Parameters:
comment
- theComment
ornull
to remove the currentComment
-
accept
Description copied from interface:Node
Accepts aNodeVisitor
for thisNode
.- Specified by:
accept
in interfaceNode<T>
- Parameters:
visitor
- aNodeVisitor
to accept- Returns:
- a
VisitResult
-
equals
-
hashCode
public int hashCode() -
toString
-