Interface SimpleComment

All Superinterfaces:
Comment
All Known Implementing Classes:
YamlBlockComment, YamlInlineComment

public interface SimpleComment extends Comment
An interface that has the comment as a String.
  • Method Details

    • create

      @Contract("_ -> new") @NotNull static @NotNull SimpleComment create(@NotNull @NotNull String content)
      Creates a new SimpleComment.
      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 new SimpleComment.
      Parameters:
      content - the content
      type - the type of the comment
      Returns:
      a new SimpleComment
    • content

      @NotNull @NotNull String content()
      Gets the content.
      Returns:
      the content
    • type

      @NotNull default @NotNull String type()
      Returns the type of this comment.
      Returns:
      the type of this comment