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
  • Method Details

    • 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

      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