control output of new lines limiting them to terminate text but not create blank lines, and control number of blank lines output, eliminate spaces before and after an \n, except in prefixes and indents controlled by this class.
allows appending unmodified text in preformatted regions created by openPreFormatted(boolean) and closePreFormatted()
consecutive \n in the data are going go be collapsed to a single \n. To get blank lines use blankLine() or blankLine(int)
tab is converted to spaces if F_CONVERT_TABS or F_COLLAPSE_WHITESPACE option is selected
spaces before and after \n are removed controlled by F_TRIM_TRAILING_WHITESPACE and F_TRIM_LEADING_WHITESPACE
use line(), lineIf(boolean), blankLine() as an alternative to appending \n.
use blankLineIf(boolean) and blankLine(int) for appending blank lines.
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALLOW_LEADING_EOL
Deprecated
ALLOW_LEADING_EOL is now inverted and named F_TRIM_LEADING_EOL
|
| public static final int | ALLOW_LEADING_WHITESPACE
Deprecated
ALLOW_LEADING_WHITESPACE is now inverted and named F_TRIM_LEADING_WHITESPACE
|
| public static final int | COLLAPSE_WHITESPACE
Deprecated
|
| public static final int | CONVERT_TABS
Deprecated
|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | FORMAT_ALL
Deprecated
|
| public static final LineAppendable. | |
| public static final LineAppendable. | |
| public static final BitFieldSet | |
| public static final LineAppendable. | |
| public static final LineAppendable. | |
| public static final LineAppendable. | |
| public static final LineAppendable. | |
| public static final LineAppendable. | |
| public static final int | PASS_THROUGH
Deprecated
|
| public static final int | PREFIX_PRE_FORMATTED
Deprecated
|
| public static final int | TRIM_LEADING_WHITESPACE
Deprecated
|
| public static final int | TRIM_TRAILING_WHITESPACE
Deprecated
|
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull LineAppendable | Returns: thisrunnable to run if adding indent on first EOL listener)Add an indent on first EOL appended and run runnable |
| public default @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thisprefix characters to add to current prefix for new lines appended after this is set prefix, boolean if true prefix will take effect after EOL afterEol)Add to prefix appended after a new line character for every line and after a new line in pre-formatted sections This appends the sequence to current prefix |
| public default @NotNull LineAppendable | Returns: thisprefix characters to add to current prefix for new lines appended after this is set prefix)Add to prefix appended after a new line character for every line and after a new line in pre-formatted sections This appends the sequence to current prefix |
| public @NotNull LineAppendable | append(@NotNull CharSequence
The character sequence to append. If csq)csq is
null, then the four characters "null" are
appended to this Appendable.Redeclares java. Appends the specified character sequence to this |
| public @NotNull LineAppendable | append(@NotNull CharSequence
The character sequence from which a subsequence will be
appended. If csq, int csq is null, then characters
will be appended as if csq contained the four
characters "null".The index of the first character in the subsequence start, int The index of the character following the last character in the
subsequence end)Redeclares java. Appends a subsequence of the specified character sequence to this
|
| public @NotNull LineAppendable | append(char
The character to append c)Redeclares java. Appends the specified character to this |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thislines to append, any unterminated lines will be terminated by a lineAppendable, int line() invocation.start line to append startLine, int end line to append, endLine is excluded. endLine, boolean true if to include prefixes from the lineAppendable. withPrefixes)Append lines from another line formatting appendable. |
| public default @NotNull LineAppendable | Returns: thislines to append lineAppendable)Append lines from another line formatting appendable. |
| public default @NotNull LineAppendable | Returns: thislines to append lineAppendable, boolean true if to include prefixes from the lineAppendable. withPrefixes)Append lines from another line formatting appendable. |
| public default @NotNull LineAppendable | |
| public default <T extends Appendable> T | |
| public < type of out T extends Appendable> T | Returns: outappendable to output the resulting lines out, boolean true if to include prefixes withPrefixes, int maximum blank lines to allow in the body, maxBlankLines, int maximum trailing blank lines at the end, if <maxBlankLines then maxBlankLines will be used, if -1 then no trailing EOL will be added maxTrailingBlankLines, int line from which to start output startLine, int line at which to stop output endLine)append lines to appendable with given maximum trailing blank lines and given prefix to add to all lines NOTE: |
| public default <T extends Appendable> T | |
| public default <T extends Appendable> T | |
| public default < type of out T extends Appendable> T | Returns: outappendable to output the resulting lines out)append lines to appendable with 0 blank lines, if these are desired at the end of the output use |
| public default <T extends Appendable> T | appendToSilently(T out, boolean withPrefixes, int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine)
|
| public default <T extends Appendable> T | |
| public default <T extends Appendable> T | |
| public default <T extends Appendable> T | |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thisnumber of blank lines to append count)Add a blank lines, if there isn't already given number of blank lines appended. |
| public @NotNull LineAppendable | Returns: thiswhen true append blank line predicate)Add a blank line, if predicate is true and there isn't already blank lines appended. |
| public @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| public int | |
| public static CharSequence | |
| public default @NotNull LineAppendable | Returns: copy of appendable with requested contentstart line startLine, int end line endLine, boolean true if to include prefixes withPrefixes)Make a copy of this appendable with the given line range |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public boolean | |
| public default @NotNull LineInfo | |
| public int | |
| public @NotNull BasedSequence | |
| public @NotNull ISequenceBuilder | |
| public @NotNull LineAppendable | |
| public @NotNull BasedSequence | Returns: char sequence of the current indent prefix used for each indent levelGet prefix appended after a new line character for every indent level |
| public @NotNull BasedSequence | Returns: line char sequenceline index lineIndex)Get Line at given line index Note if there is an unterminated line it will be available as the last line, without being terminated explicitly |
| public default @NotNull BasedSequence | Returns: char sequence for the lineline index lineIndex)Get Line content of given line |
| public int | Returns: number of full lines appendedGet the number of lines appended, not including any unterminated ones |
| public int | Returns: number of lines appendedGet the number of lines appended, including any unterminated ones Note if there is an unterminated line it will be available as the last line, without being terminated explicitly |
| public @NotNull LineInfo | Returns: line infoline index for the info to get lineIndex)Get Line information at given line index Note if there is an unterminated line it will be available as the last line, without being terminated explicitly |
| public default @NotNull BasedSequence | |
| public @NotNull Iterable | Returns: iterator over linesmaximum trailing blank lines, -1 if trailing EOL should be removed maxTrailingBlankLines, int start line index startLine, int end line index, exclusive endLine, boolean true if prefixes should be included, else only non-prefix line text withPrefixes)Full line iterator over some lines Note will issue line() to terminate any unterminated lines before iteration |
| public default @NotNull Iterable | |
| public default @NotNull Iterable | |
| public default @NotNull Iterable | |
| public default @NotNull Iterable | |
| public @NotNull Iterable | Returns: iterator over linesmaximum trailing blank lines, -1 if trailing EOL should be removed maxTrailingBlankLines, int start line index startLine, int end line index, exclusive endLine)Full line iterator with line info Note will issue line() to terminate any unterminated lines before iteration |
| public default @NotNull Iterable | |
| public default @NotNull Iterable | |
| public default int | |
| public @NotNull BitFieldSet | Returns: mutable option setGet current options as set which can be used to modify options |
| public int | Returns: number of eols at end of textGet number of EOLs at end of appendable, this is actually number of tail blank lines |
| public int | |
| public @NotNull BasedSequence | Returns: char sequence of the current prefixGet prefix being applied to all lines, even in pre-formatted sections This is the prefix that will be set after EOL |
| public int | Returns: number of trailing blank linesend line endLine)Get trailing blank line count ending on given line |
| public default int | |
| public @NotNull LineAppendable | Returns: thisIncrease the indent level, will terminate the current line if there is unterminated text Note this is equivalent to pushPrefix(), addPrefix(getIndentPrefix()) but adds a flag to
validate that |
| public void | insertLine(int
index of the line lineIndex, @NotNull CharSequence prefix of the line prefix, @NotNull CharSequence content text of the line text)Insert a line at the index with given content and prefix for a line |
| public default boolean | |
| public default boolean | |
| public boolean | |
| public boolean | |
| public @NotNull Iterator | Returns: iterator over linesRedeclares java. Full line iterator NOTE: will not issue line() to terminate any unterminated lines before iteration and will not include unterminated lines in iteration |
| public @NotNull LineAppendable | Returns: thisAdd a new line if there was any unterminated text appended or if this is a preformatted region |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thisnumber of trailing spaces to add count)Add a new line, keep trailing spaces if there was any unterminated text appended Note only applies in preformatted region or if the line is not empty |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public int | Returns: offset of text as would be returned for allGet text offset of all output lines, excluding any text for the last line being accumulated |
| public int | Returns: offset as would be returned byoffset() after line() call less 1 for EOLGet offset after last append as if EOL was added but without the EOL itself |
| public @NotNull LineAppendable | Returns: thisif true will add the current prefix to first line addPrefixToFirstLine)Open preformatted section and suspend content modification |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thisif true prefix will take effect after EOL afterEol)Pop a prefix from the stack and set the current prefix |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| public LineAppendable | Returns: thismaximum blank lines to allow in the body maxBlankLines, int maximum trailing blank lines ending on endLine, if <maxBlankLines then maxBlankLines will be used maxTrailingBlankLines, int line from which to start output startLine, int line at which to stop output endLine)Normalize the appendable by removing extra blank lines in the body or at the end of given line range |
| public default LineAppendable | |
| public @NotNull LineAppendable | Returns: thisrunnable added with addIndentOnFirstEOL listener)Remove runnable, has no effect if EOL was already appended and runnable was run |
| public @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thisprefix characters for new lines appended after this is set prefix)Set prefix to append after a new line character for every indent level |
| public void | setLine(int
index of the line lineIndex, @NotNull CharSequence prefix of the line prefix, @NotNull CharSequence content text of the line text)Set content and prefix for a line |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | |
| public default @NotNull LineAppendable | Returns: thisoption set optionsSet options on processing text |
| public @NotNull LineAppendable | Returns: thisprefix characters to add to current prefix for new lines appended after this is set prefix, boolean if true prefix will take effect after EOL afterEol)Set prefix appended after a new line character for every line and after a new line in pre-formatted sections This appends the sequence to current prefix |
| public default @NotNull LineAppendable | Returns: thisprefix characters to add to current prefix for new lines appended after this is set prefix)Set prefix appended after a new line character for every line and after a new line in pre-formatted sections This appends the sequence to current prefix |
| public void | setPrefixLength(int
index of the line lineIndex, int new prefix length prefixLength)Change prefix length for a given line without changing the line content |
| public static BitFieldSet | |
| public static BitFieldSet | |
| public @NotNull CharSequence | Returns: resulting textmaximum blank lines to allow in the text maxBlankLines, int maximum trailing blank lines maxTrailingBlankLines, boolean true if to include prefixes withPrefixes)get the resulting text for all lines |
| public default @NotNull CharSequence | |
| public default @NotNull CharSequence | |
| public default @NotNull CharSequence | |
| public default @NotNull CharSequence | |
| public @NotNull String | Returns: resulting textmaximum blank lines to allow in the text maxBlankLines, int maximum trailing blank lines maxTrailingBlankLines, boolean true if to include prefixes withPrefixes)get the resulting text for all lines |
| public default @NotNull String | |
| public default @NotNull String | |
| public default @NotNull String | |
| public default @NotNull String | Returns: resulting textmaximum blank lines to allow, if -1 then no trailing EOL will be generated maxBlankLines)get the resulting text for all lines |
| public default @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | Returns: thisDecrease the indent level, if there is unterminated text then unindented prefix is to be applied after the next EOL. |