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
Represents a comment in a Prickle file. This supports single line comments or multi-line comments as arrays.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResolves comments by wrapping the text to the specified width and optionally padding multi-line comments to the maximum line length. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ICommentResolverThe default wrapped comment resolver. -
Constructor Summary
ConstructorsConstructorDescriptionWrappedComment(String text, int lineLength, boolean pad) Create a wrapped comment. -
Method Summary
-
Field Details
-
RESOLVER
The default wrapped comment resolver. Lines will be wrapped to 80 and multi-line comments will be padded.
-
-
Constructor Details
-
WrappedComment
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.
-