Package dev.siroshun.configapi.core.node
Class CommentedNode<T>
java.lang.Object
dev.siroshun.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 VisitResultaccept(@NotNull NodeVisitor visitor) Accepts aNodeVisitorfor thisNode.boolean@NotNull CommentGets theComment.booleanChecks if thisCommentableNodehas theComment.inthashCode()node()Gets the wrappedNode.voidsetComment(@Nullable Comment comment) Sets theComment.toString()@UnknownNullability Tvalue()Gets an object which thisNodeholdsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.siroshun.configapi.core.node.CommentableNode
getCommentOrNullMethods inherited from interface dev.siroshun.configapi.core.node.Node
asOptional, hasValue
-
Method Details
-
value
Description copied from interface:NodeGets an object which thisNodeholds -
node
Gets the wrappedNode.- Returns:
- the wrapped
Node
-
hasComment
public boolean hasComment()Description copied from interface:CommentableNodeChecks if thisCommentableNodehas theComment.- Specified by:
hasCommentin interfaceCommentableNode<T>- Returns:
trueif thisCommentableNodehas theComment, otherwisefalse
-
getComment
Description copied from interface:CommentableNodeGets theComment.- Specified by:
getCommentin interfaceCommentableNode<T>- Returns:
- the
Comment
-
setComment
Description copied from interface:CommentableNodeSets theComment.- Specified by:
setCommentin interfaceCommentableNode<T>- Parameters:
comment- theCommentornullto remove the currentComment
-
accept
Description copied from interface:NodeAccepts aNodeVisitorfor thisNode.- Specified by:
acceptin interfaceNode<T>- Parameters:
visitor- aNodeVisitorto accept- Returns:
- a
VisitResult
-
equals
-
hashCode
public int hashCode() -
toString
-