Interface SimpleComment
- All Superinterfaces:
Comment
- All Known Implementing Classes:
YamlBlockComment
,YamlInlineComment
An interface that has the comment as a
String
.-
Method Summary
Modifier and TypeMethodDescription@NotNull String
content()
Gets the content.static @NotNull SimpleComment
Creates a newSimpleComment
.static @NotNull SimpleComment
Creates a newSimpleComment
.default @NotNull String
type()
Returns the type of this comment.
-
Method Details
-
create
@Contract("_ -> new") @NotNull static @NotNull SimpleComment create(@NotNull @NotNull String content) Creates a newSimpleComment
.- Parameters:
content
- the content- Returns:
- a new
SimpleComment
-
create
@Contract("_, _ -> new") @NotNull static @NotNull SimpleComment create(@NotNull @NotNull String content, @NotNull @NotNull String type) Creates a newSimpleComment
.- Parameters:
content
- the contenttype
- the type of the comment- Returns:
- a new
SimpleComment
-
content
Gets the content.- Returns:
- the content
-
type
Returns the type of this comment.- Returns:
- the type of this comment
-