public interface LineAppendable extends Appendable, Iterable<LineInfo>
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 | Interface and Description |
|---|---|
static class |
LineAppendable.Options |
| Modifier and Type | Method and Description |
|---|---|
@NotNull LineAppendable |
addIndentOnFirstEOL(@NotNull Runnable listener)
Add an indent on first EOL appended and run runnable
|
default @NotNull LineAppendable |
addOptions(int flags) |
default @NotNull LineAppendable |
addPrefix(@NotNull CharSequence prefix)
Add to prefix appended after a new line character for every line
and after a new line in pre-formatted sections
|
@NotNull LineAppendable |
addPrefix(@NotNull CharSequence prefix,
boolean afterEol)
Add to prefix appended after a new line character for every line
and after a new line in pre-formatted sections
|
@NotNull LineAppendable |
append(char c) |
@NotNull LineAppendable |
append(char c,
int count) |
@NotNull LineAppendable |
append(@NotNull CharSequence csq) |
@NotNull LineAppendable |
append(@NotNull CharSequence csq,
int start,
int end) |
default @NotNull LineAppendable |
append(@NotNull LineAppendable lineAppendable)
Append lines from another line formatting appendable.
|
default @NotNull LineAppendable |
append(@NotNull LineAppendable lineAppendable,
boolean withPrefixes)
Append lines from another line formatting appendable.
|
@NotNull LineAppendable |
append(@NotNull LineAppendable lineAppendable,
int startLine,
int endLine,
boolean withPrefixes)
Append lines from another line formatting appendable.
|
default @NotNull LineAppendable |
appendAll(@NotNull Iterable<CharSequence> sequences) |
default <T extends Appendable> |
appendTo(T out)
append lines to appendable with 0 blank lines, if these are desired at the end of the output use
appendTo(Appendable, int, int). |
<T extends Appendable> |
appendTo(T out,
boolean withPrefixes,
int maxBlankLines,
int maxTrailingBlankLines,
int startLine,
int endLine)
append lines to appendable with given maximum trailing blank lines and given prefix to add to all lines
|
default <T extends Appendable> |
appendTo(T out,
int maxTrailingBlankLines)
Deprecated.
|
default <T extends Appendable> |
appendTo(T out,
int maxBlankLines,
int maxTrailingBlankLines) |
default <T extends Appendable> |
appendTo(T out,
int maxBlankLines,
int maxTrailingBlankLines,
int startLine,
int endLine) |
default <T extends Appendable> |
appendToSilently(T out) |
default <T extends Appendable> |
appendToSilently(T out,
boolean withPrefixes,
int maxBlankLines,
int maxTrailingBlankLines,
int startLine,
int endLine) |
default <T extends Appendable> |
appendToSilently(T out,
int maxBlankLines,
int maxTrailingBlankLines) |
default <T extends Appendable> |
appendToSilently(T out,
int maxBlankLines,
int maxTrailingBlankLines,
int startLine,
int endLine) |
@NotNull LineAppendable |
blankLine()
Add a blank line, if there is not one already appended.
|
@NotNull LineAppendable |
blankLine(int count)
Add a blank lines, if there isn't already given number of blank lines appended.
|
@NotNull LineAppendable |
blankLineIf(boolean predicate)
Add a blank line, if predicate is true and there isn't already blank lines appended.
|
@NotNull LineAppendable |
changeOptions(int addFlags,
int removeFlags) |
default @NotNull LineAppendable |
clearLineOnFirstText() |
@NotNull LineAppendable |
closePreFormatted()
Close preformatted section and suspend content modification
|
int |
column()
Get column offset after last append
|
static CharSequence |
combinedPrefix(@Nullable CharSequence prefix,
@Nullable CharSequence suffix) |
default @NotNull LineAppendable |
copyAppendable() |
default @NotNull LineAppendable |
copyAppendable(boolean withPrefixes) |
default @NotNull LineAppendable |
copyAppendable(int startLine) |
default @NotNull LineAppendable |
copyAppendable(int startLine,
int endLine) |
default @NotNull LineAppendable |
copyAppendable(int startLine,
int endLine,
boolean withPrefixes)
Make a copy of this appendable with the given line range
|
boolean |
endsWithEOL() |
default @NotNull LineInfo |
get(int lineIndex)
Kotlin index operator
|
int |
getAfterEolPrefixDelta()
Get pending prefix after EOL
|
@NotNull BasedSequence |
getBeforeEolPrefix()
Get prefix used before EOL
|
@NotNull ISequenceBuilder<?,?> |
getBuilder()
Get builder used for accumulation
|
@NotNull LineAppendable |
getEmptyAppendable() |
@NotNull BasedSequence |
getIndentPrefix()
Get prefix appended after a new line character for every indent level
|
@NotNull BasedSequence |
getLine(int lineIndex)
Get Line at given line index
|
default @NotNull BasedSequence |
getLineContent(int lineIndex)
Get Line content of given line
|
int |
getLineCount()
Get the number of lines appended, not including any unterminated ones
|
int |
getLineCountWithPending()
Get the number of lines appended, including any unterminated ones
|
@NotNull LineInfo |
getLineInfo(int lineIndex)
Get Line information at given line index
|
default @NotNull BasedSequence |
getLinePrefix(int lineIndex)
Get prefix of given line
|
default @NotNull Iterable<BasedSequence> |
getLines() |
default @NotNull Iterable<BasedSequence> |
getLines(boolean withPrefixes) |
default @NotNull Iterable<BasedSequence> |
getLines(int maxTrailingBlankLines) |
default @NotNull Iterable<BasedSequence> |
getLines(int maxTrailingBlankLines,
boolean withPrefixes) |
@NotNull Iterable<BasedSequence> |
getLines(int maxTrailingBlankLines,
int startLine,
int endLine,
boolean withPrefixes)
Full line iterator over some lines
|
default @NotNull Iterable<LineInfo> |
getLinesInfo() |
default @NotNull Iterable<LineInfo> |
getLinesInfo(int maxTrailingBlankLines) |
@NotNull Iterable<LineInfo> |
getLinesInfo(int maxTrailingBlankLines,
int startLine,
int endLine)
Full line iterator with line info
|
default int |
getOptions()
Get current options as bit mask flags
|
@NotNull com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> |
getOptionSet()
Get current options as set which can be used to modify options
|
int |
getPendingEOL()
Get number of EOLs at end of appendable, this is actually number of tail blank lines
|
int |
getPendingSpace()
Get number of spaces at end of pending text
|
@NotNull BasedSequence |
getPrefix()
Get prefix being applied to all lines, even in pre-formatted sections
This is the prefix that will be set after EOL
|
default int |
getTrailingBlankLines() |
int |
getTrailingBlankLines(int endLine)
Get trailing blank line count ending on given line
|
@NotNull LineAppendable |
indent()
Increase the indent level, will terminate the current line if there is unterminated text
|
void |
insertLine(int lineIndex,
@NotNull CharSequence prefix,
@NotNull CharSequence text)
Insert a line at the index with given content and prefix for a line
|
default boolean |
isEmpty()
Kotlin compatibility
|
default boolean |
isNotEmpty()
Kotlin compatibility
|
boolean |
isPendingSpace()
Test if trailing text ends in space or tab
|
boolean |
isPreFormatted() |
@NotNull Iterator<LineInfo> |
iterator()
Full line iterator
NOTE: will not issue line() to terminate any unterminated lines before iteration and will not include unterminated lines in iteration
|
@NotNull LineAppendable |
line()
Add a new line if there was any unterminated text appended or if this is a preformatted region
|
@NotNull LineAppendable |
lineIf(boolean predicate)
Add a new line, if predicate is true and line() would add an EOL.
|
@NotNull LineAppendable |
lineOnFirstText(boolean value) |
@NotNull LineAppendable |
lineWithTrailingSpaces(int count)
Add a new line, keep trailing spaces if there was any unterminated text appended
|
default @NotNull LineAppendable |
noPreserveSpaces() |
default @NotNull LineAppendable |
noTrimLeading() |
int |
offset()
Get text offset of all output lines, excluding any text for the last line being accumulated
|
int |
offsetWithPending()
Get offset after last append as if EOL was added but without the EOL itself
|
@NotNull LineAppendable |
openPreFormatted(boolean addPrefixToFirstLine)
Open preformatted section and suspend content modification
|
@NotNull LineAppendable |
popOptions() |
default @NotNull LineAppendable |
popPrefix()
Pop a prefix from the stack and set the current prefix
|
@NotNull LineAppendable |
popPrefix(boolean afterEol)
Pop a prefix from the stack and set the current prefix
|
default @NotNull LineAppendable |
preserveSpaces() |
@NotNull LineAppendable |
pushOptions() |
@NotNull LineAppendable |
pushPrefix()
Save the current prefix on the stack
|
default LineAppendable |
removeExtraBlankLines(int maxBlankLines,
int maxTrailingBlankLines) |
LineAppendable |
removeExtraBlankLines(int maxBlankLines,
int maxTrailingBlankLines,
int startLine,
int endLine)
Normalize the appendable by removing extra blank lines in the body or at the end of given line range
|
@NotNull LineAppendable |
removeIndentOnFirstEOL(@NotNull Runnable listener)
Remove runnable, has no effect if EOL was already appended and runnable was run
|
@NotNull LineAppendable |
removeLines(int startLine,
int endLine) |
default @NotNull LineAppendable |
removeOptions(int flags) |
@NotNull LineAppendable |
setIndentPrefix(@Nullable CharSequence prefix)
Set prefix to append after a new line character for every indent level
|
void |
setLine(int lineIndex,
@NotNull CharSequence prefix,
@NotNull CharSequence text)
Set content and prefix for a line
|
default @NotNull LineAppendable |
setLineOnFirstText() |
default @NotNull LineAppendable |
setOptions(com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> options)
Set options on processing text
|
default @NotNull LineAppendable |
setOptions(int flags)
Set options on processing text
|
default @NotNull LineAppendable |
setOptions(LineAppendable.Options... options) |
default @NotNull LineAppendable |
setPrefix(@NotNull CharSequence prefix)
Set prefix appended after a new line character for every line
and after a new line in pre-formatted sections
|
@NotNull LineAppendable |
setPrefix(@Nullable CharSequence prefix,
boolean afterEol)
Set prefix appended after a new line character for every line
and after a new line in pre-formatted sections
|
void |
setPrefixLength(int lineIndex,
int prefixLength)
Change prefix length for a given line without changing the line content
|
static com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> |
toOptionSet(int options) |
static com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> |
toOptionSet(LineAppendable.Options... options) |
default @NotNull CharSequence |
toSequence() |
default @NotNull CharSequence |
toSequence(boolean withPrefixes) |
default @NotNull CharSequence |
toSequence(int maxBlankLines,
boolean withPrefixes) |
default @NotNull CharSequence |
toSequence(int maxBlankLines,
int maxTrailingBlankLines) |
@NotNull CharSequence |
toSequence(int maxBlankLines,
int maxTrailingBlankLines,
boolean withPrefixes)
get the resulting text for all lines
|
default @NotNull String |
toString(boolean withPrefixes) |
default @NotNull String |
toString(int maxBlankLines)
get the resulting text for all lines
|
default @NotNull String |
toString(int maxBlankLines,
boolean withPrefixes) |
default @NotNull String |
toString(int maxBlankLines,
int maxTrailingBlankLines) |
@NotNull String |
toString(int maxBlankLines,
int maxTrailingBlankLines,
boolean withPrefixes)
get the resulting text for all lines
|
default @NotNull LineAppendable |
trimLeading() |
@NotNull LineAppendable |
unIndent()
Decrease the indent level, min level is 0, will terminate the current line if there is unterminated text
|
@NotNull LineAppendable |
unIndentNoEol()
Decrease the indent level, if there is unterminated text then unindented prefix
is to be applied after the next EOL.
|
forEach, spliteratorstatic final LineAppendable.Options O_CONVERT_TABS
static final LineAppendable.Options O_COLLAPSE_WHITESPACE
static final LineAppendable.Options O_TRIM_TRAILING_WHITESPACE
static final LineAppendable.Options O_PASS_THROUGH
static final LineAppendable.Options O_TRIM_LEADING_WHITESPACE
static final LineAppendable.Options O_TRIM_LEADING_EOL
static final LineAppendable.Options O_PREFIX_PRE_FORMATTED
static final com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> O_FORMAT_ALL
static final int F_CONVERT_TABS
static final int F_COLLAPSE_WHITESPACE
static final int F_TRIM_TRAILING_WHITESPACE
static final int F_PASS_THROUGH
static final int F_TRIM_LEADING_WHITESPACE
static final int F_TRIM_LEADING_EOL
static final int F_PREFIX_PRE_FORMATTED
static final int F_FORMAT_ALL
static final int F_WHITESPACE_REMOVAL
@Deprecated static final int CONVERT_TABS
@Deprecated static final int COLLAPSE_WHITESPACE
@Deprecated static final int TRIM_TRAILING_WHITESPACE
@Deprecated static final int PASS_THROUGH
@Deprecated static final int ALLOW_LEADING_WHITESPACE
@Deprecated static final int TRIM_LEADING_WHITESPACE
@Deprecated static final int ALLOW_LEADING_EOL
@Deprecated static final int PREFIX_PRE_FORMATTED
@Deprecated static final int FORMAT_ALL
static com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> toOptionSet(int options)
static com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> toOptionSet(LineAppendable.Options... options)
default int getOptions()
@NotNull @NotNull LineAppendable getEmptyAppendable()
@NotNull default @NotNull LineAppendable copyAppendable(int startLine, int endLine, boolean withPrefixes)
startLine - start lineendLine - end linewithPrefixes - true if to include prefixes@NotNull default @NotNull LineAppendable copyAppendable(int startLine, int endLine)
@NotNull default @NotNull LineAppendable copyAppendable(int startLine)
@NotNull default @NotNull LineAppendable copyAppendable()
@NotNull default @NotNull LineAppendable copyAppendable(boolean withPrefixes)
@NotNull @NotNull com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> getOptionSet()
@NotNull @NotNull LineAppendable pushOptions()
@NotNull @NotNull LineAppendable popOptions()
@NotNull default @NotNull LineAppendable noTrimLeading()
@NotNull default @NotNull LineAppendable trimLeading()
@NotNull default @NotNull LineAppendable preserveSpaces()
@NotNull default @NotNull LineAppendable noPreserveSpaces()
@NotNull default @NotNull LineAppendable removeOptions(int flags)
@NotNull default @NotNull LineAppendable addOptions(int flags)
@NotNull @NotNull LineAppendable changeOptions(int addFlags, int removeFlags)
@NotNull default @NotNull LineAppendable setOptions(int flags)
flags - option flags@NotNull default @NotNull LineAppendable setOptions(LineAppendable.Options... options)
@NotNull default @NotNull LineAppendable setOptions(com.vladsch.flexmark.util.misc.BitFieldSet<LineAppendable.Options> options)
options - option set@NotNull @NotNull ISequenceBuilder<?,?> getBuilder()
int getTrailingBlankLines(int endLine)
endLine - end linedefault int getTrailingBlankLines()
boolean endsWithEOL()
@NotNull @NotNull LineAppendable append(@NotNull @NotNull CharSequence csq)
append in interface Appendable@NotNull @NotNull LineAppendable append(@NotNull @NotNull CharSequence csq, int start, int end)
append in interface Appendable@NotNull @NotNull LineAppendable append(char c)
append in interface Appendable@NotNull @NotNull LineAppendable append(char c, int count)
@NotNull default @NotNull LineAppendable appendAll(@NotNull @NotNull Iterable<CharSequence> sequences)
@NotNull @NotNull LineAppendable append(@NotNull @NotNull LineAppendable lineAppendable, int startLine, int endLine, boolean withPrefixes)
NOTE: does not apply formatting options. Instead, appends already formatted lines as is
If there is an accumulating line, it will be terminated by an EOL before appending lines
lineAppendable - lines to append, any unterminated lines will be terminated by a line() invocation.startLine - start line to appendendLine - end line to append, endLine is excluded.withPrefixes - true if to include prefixes from the lineAppendable.@NotNull default @NotNull LineAppendable append(@NotNull @NotNull LineAppendable lineAppendable)
NOTE: does not apply formatting options other than prefix. Line text is used as is.
If there is an unterminated line its contents will be used as leading text of the first appended line
lineAppendable - lines to append@NotNull default @NotNull LineAppendable append(@NotNull @NotNull LineAppendable lineAppendable, boolean withPrefixes)
NOTE: does not apply formatting options other than prefix. Line text is used as is.
If there is an unterminated line its contents will be used as leading text of the first appended line
lineAppendable - lines to appendwithPrefixes - true if to include prefixes from the lineAppendable.@NotNull @NotNull LineAppendable line()
@NotNull @NotNull LineAppendable lineWithTrailingSpaces(int count)
NOTE: only applies in preformatted region or if the line is not empty
count - number of trailing spaces to add@NotNull @NotNull LineAppendable lineIf(boolean predicate)
predicate - call line() if value is true.@NotNull @NotNull LineAppendable blankLine()
@NotNull @NotNull LineAppendable blankLineIf(boolean predicate)
predicate - when true append blank line@NotNull @NotNull LineAppendable blankLine(int count)
count - number of blank lines to appendboolean isPreFormatted()
@NotNull @NotNull LineAppendable openPreFormatted(boolean addPrefixToFirstLine)
addPrefixToFirstLine - if true will add the current prefix to first line@NotNull @NotNull LineAppendable closePreFormatted()
@NotNull @NotNull LineAppendable indent()
NOTE: this is equivalent to pushPrefix(), addPrefix(getIndentPrefix()) but adds a flag to
validate that unIndent() is called only on prefixes added by this method
@NotNull @NotNull LineAppendable unIndent()
NOTE: this is equivalent to popPrefix() but with validation
that it is called only on prefixes added by indent()
@NotNull @NotNull LineAppendable unIndentNoEol()
Will NOT terminate the current line if there is unterminated text
NOTE: should be used with addIndentOnFirstEOL(Runnable) if callback is invoked
@NotNull @NotNull BasedSequence getIndentPrefix()
@NotNull @NotNull LineAppendable setIndentPrefix(@Nullable @Nullable CharSequence prefix)
prefix - prefix characters for new lines appended after this is set@NotNull @NotNull BasedSequence getPrefix()
@NotNull @NotNull BasedSequence getBeforeEolPrefix()
@NotNull @NotNull LineAppendable addPrefix(@NotNull @NotNull CharSequence prefix, boolean afterEol)
This appends the sequence to current prefix
prefix - prefix characters to add to current prefix for new lines appended after this is setafterEol - if true prefix will take effect after EOL@NotNull @NotNull LineAppendable setPrefix(@Nullable @Nullable CharSequence prefix, boolean afterEol)
This appends the sequence to current prefix
prefix - prefix characters to add to current prefix for new lines appended after this is setafterEol - if true prefix will take effect after EOL@NotNull default @NotNull LineAppendable addPrefix(@NotNull @NotNull CharSequence prefix)
This appends the sequence to current prefix
prefix - prefix characters to add to current prefix for new lines appended after this is set@NotNull default @NotNull LineAppendable setPrefix(@NotNull @NotNull CharSequence prefix)
This appends the sequence to current prefix
prefix - prefix characters to add to current prefix for new lines appended after this is set@NotNull @NotNull LineAppendable pushPrefix()
@NotNull @NotNull LineAppendable popPrefix(boolean afterEol)
afterEol - if true prefix will take effect after EOL@NotNull default @NotNull LineAppendable popPrefix()
int getAfterEolPrefixDelta()
int column()
int offset()
int offsetWithPending()
offset() after line() call less 1 for EOLboolean isPendingSpace()
int getPendingSpace()
int getPendingEOL()
@NotNull @NotNull LineAppendable lineOnFirstText(boolean value)
@NotNull default @NotNull LineAppendable setLineOnFirstText()
@NotNull default @NotNull LineAppendable clearLineOnFirstText()
@NotNull @NotNull LineAppendable addIndentOnFirstEOL(@NotNull @NotNull Runnable listener)
listener - runnable to run if adding indent on first EOL@NotNull @NotNull LineAppendable removeIndentOnFirstEOL(@NotNull @NotNull Runnable listener)
listener - runnable added with addIndentOnFirstEOLint getLineCount()
default boolean isEmpty()
default boolean isNotEmpty()
int getLineCountWithPending()
NOTE: if there is an unterminated line it will be available as the last line, without being terminated explicitly
@NotNull @NotNull LineInfo getLineInfo(int lineIndex)
NOTE: if there is an unterminated line it will be available as the last line, without being terminated explicitly
lineIndex - line index for the info to get@NotNull default @NotNull LineInfo get(int lineIndex)
lineIndex - line index@NotNull @NotNull BasedSequence getLine(int lineIndex)
NOTE: if there is an unterminated line it will be available as the last line, without being terminated explicitly
lineIndex - line index@NotNull @NotNull Iterator<LineInfo> iterator()
@NotNull @NotNull Iterable<BasedSequence> getLines(int maxTrailingBlankLines, int startLine, int endLine, boolean withPrefixes)
NOTE: will issue line() to terminate any unterminated lines before iteration
maxTrailingBlankLines - maximum trailing blank lines, -1 if trailing EOL should be removedstartLine - start line indexendLine - end line index, exclusivewithPrefixes - true if prefixes should be included, else only non-prefix line text@NotNull default @NotNull Iterable<BasedSequence> getLines(int maxTrailingBlankLines)
@NotNull default @NotNull Iterable<BasedSequence> getLines()
@NotNull default @NotNull Iterable<BasedSequence> getLines(int maxTrailingBlankLines, boolean withPrefixes)
@NotNull default @NotNull Iterable<BasedSequence> getLines(boolean withPrefixes)
@NotNull @NotNull Iterable<LineInfo> getLinesInfo(int maxTrailingBlankLines, int startLine, int endLine)
NOTE: will issue line() to terminate any unterminated lines before iteration
maxTrailingBlankLines - maximum trailing blank lines, -1 if trailing EOL should be removedstartLine - start line indexendLine - end line index, exclusive@NotNull default @NotNull BasedSequence getLineContent(int lineIndex)
lineIndex - line index@NotNull default @NotNull BasedSequence getLinePrefix(int lineIndex)
lineIndex - line indexvoid setPrefixLength(int lineIndex,
int prefixLength)
lineIndex - index of the lineprefixLength - new prefix lengthvoid setLine(int lineIndex,
@NotNull
@NotNull CharSequence prefix,
@NotNull
@NotNull CharSequence text)
lineIndex - index of the lineprefix - prefix of the linetext - content text of the linevoid insertLine(int lineIndex,
@NotNull
@NotNull CharSequence prefix,
@NotNull
@NotNull CharSequence text)
lineIndex - index of the lineprefix - prefix of the linetext - content text of the line@NotNull @NotNull LineAppendable removeLines(int startLine, int endLine)
@NotNull @NotNull String toString(int maxBlankLines, int maxTrailingBlankLines, boolean withPrefixes)
maxBlankLines - maximum blank lines to allow in the textmaxTrailingBlankLines - maximum trailing blank lineswithPrefixes - true if to include prefixes@NotNull default @NotNull String toString(int maxBlankLines, int maxTrailingBlankLines)
@NotNull default @NotNull String toString(int maxBlankLines, boolean withPrefixes)
@NotNull default @NotNull String toString(boolean withPrefixes)
@NotNull default @NotNull String toString(int maxBlankLines)
maxBlankLines - maximum blank lines to allow, if -1 then no trailing EOL will be generated@NotNull @NotNull CharSequence toSequence(int maxBlankLines, int maxTrailingBlankLines, boolean withPrefixes)
maxBlankLines - maximum blank lines to allow in the textmaxTrailingBlankLines - maximum trailing blank lineswithPrefixes - true if to include prefixes@NotNull default @NotNull CharSequence toSequence(int maxBlankLines, int maxTrailingBlankLines)
@NotNull default @NotNull CharSequence toSequence(int maxBlankLines, boolean withPrefixes)
@NotNull default @NotNull CharSequence toSequence(boolean withPrefixes)
@NotNull default @NotNull CharSequence toSequence()
@Deprecated default <T extends Appendable> T appendTo(@NotNull T out, int maxTrailingBlankLines) throws IOException
IOException<T extends Appendable> T appendTo(@NotNull T out, boolean withPrefixes, int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine) throws IOException
NOTE:
T - type of outout - appendable to output the resulting lineswithPrefixes - true if to include prefixesmaxBlankLines - maximum blank lines to allow in the body,maxTrailingBlankLines - maximum trailing blank lines at the end, if <maxBlankLines then maxBlankLines will be used, if -1 then no trailing EOL will be addedstartLine - line from which to start outputendLine - line at which to stop outputIOException - if thrown by appendabledefault <T extends Appendable> T appendTo(@NotNull T out, int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine) throws IOException
IOExceptiondefault <T extends Appendable> T appendTo(@NotNull T out, int maxBlankLines, int maxTrailingBlankLines) throws IOException
IOExceptiondefault <T extends Appendable> T appendTo(@NotNull T out) throws IOException
appendTo(Appendable, int, int).T - type of outout - appendable to output the resulting linesIOException - thrown by out.default <T extends Appendable> T appendToSilently(@NotNull T out, boolean withPrefixes, int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine)
default <T extends Appendable> T appendToSilently(@NotNull T out, int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine)
default <T extends Appendable> T appendToSilently(@NotNull T out, int maxBlankLines, int maxTrailingBlankLines)
default <T extends Appendable> T appendToSilently(@NotNull T out)
LineAppendable removeExtraBlankLines(int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine)
maxBlankLines - maximum blank lines to allow in the bodymaxTrailingBlankLines - maximum trailing blank lines ending on endLine, if <maxBlankLines then maxBlankLines will be usedstartLine - line from which to start outputendLine - line at which to stop outputdefault LineAppendable removeExtraBlankLines(int maxBlankLines, int maxTrailingBlankLines)
static CharSequence combinedPrefix(@Nullable @Nullable CharSequence prefix, @Nullable @Nullable CharSequence suffix)
Copyright © 2020. All rights reserved.