Class WrappedComment

java.lang.Object
net.darkhax.pricklemc.common.api.config.comment.Comment
net.darkhax.pricklemc.common.api.config.comment.WrappedComment
All Implemented Interfaces:
IComment

public class WrappedComment extends Comment
Represents a comment in a Prickle file. This supports single line comments or multi-line comments as arrays.
  • Field Details

    • RESOLVER

      public static final ICommentResolver RESOLVER
      The default wrapped comment resolver. Lines will be wrapped to 80 and multi-line comments will be padded.
  • Constructor Details

    • WrappedComment

      public WrappedComment(String text, int lineLength, boolean pad)
      Create a wrapped comment.
      Parameters:
      text - The comment text.
      lineLength - The maximum length per line of the comment. If a word causes the line to overflow it will be wrapped to the next line.
      pad - When true the lines will be right-padded to the maximum line length if they are below the limit.