| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private ISequenceBuilder | |
| private static final char | |
| private int | |
| private CharSequence | |
| private final Stack | |
| private final ArrayList | |
| private boolean | |
| pack-priv final ArrayList | |
| pack-priv int | |
| private final BitFieldSet | |
| private final Stack | |
| private final boolean | |
| private CharSequence | |
| private CharSequence | |
| private final Stack | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | LineAppendableImpl(@Nullable Appendable appendable, BitFieldSet<LineAppendable.
|
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull LineAppendable | |
| private void | |
| public @NotNull LineAppendable | |
| private boolean | |
| 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.Implements 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)Implements java. Appends a subsequence of the specified character sequence to this
|
| public @NotNull LineAppendable | append(char
The character to append c)Implements com. Appends the specified character to this |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| private void | |
| private void | |
| private void | |
| private void | |
| public <T extends Appendable> T | appendTo(T
appendable 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)Implements com. append lines to appendable with given maximum trailing blank lines and given prefix to add to all lines NOTE: |
| public <T extends Appendable> T | appendToNoLine(T out, boolean withPrefixes, int maxBlankLines, int maxTrailingBlankLines, int startLine, int endLine)
|
| public @NotNull LineAppendable | blankLine()
Implements com. Add a blank line, if there is not one already appended. |
| public @NotNull LineAppendable | blankLine(int
number of blank lines to append count)Implements com. Add a blank lines, if there isn't already given number of blank lines appended. |
| public @NotNull LineAppendable | blankLineIf(boolean
when true append blank line predicate)Implements com. Add a blank line, if predicate is true and there isn't already blank lines appended. |
| public @NotNull LineAppendable | changeOptions(int addFlags, int removeFlags)
Implements com.
|
| public @NotNull LineAppendable | closePreFormatted()
Implements com. Close preformatted section and suspend content modification |
| public int | column()
Implements com. Get column offset after last append |
| private LineInfo | |
| private void | |
| public boolean | |
| public int | getAfterEolPrefixDelta()
Implements com. Get pending prefix after EOL |
| public @NotNull BasedSequence | getBeforeEolPrefix()
Implements com. Get prefix used before EOL |
| public @NotNull ISequenceBuilder | getBuilder()
Implements com. Get builder used for accumulation |
| public @NotNull LineAppendable | |
| public @NotNull BasedSequence | getIndentPrefix()
Implements com. Get prefix appended after a new line character for every indent level |
| pack-priv @NotNull LineAppendableImpl. | |
| pack-priv @NotNull LineAppendableImpl. | |
| pack-priv @NotNull LineInfo | |
| public @NotNull BasedSequence | getLine(int
line index lineIndex)Implements com. 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 int | getLineCount()
Implements com. Get the number of lines appended, not including any unterminated ones |
| public int | getLineCountWithPending()
Implements com. Get 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 | getLineInfo(int
line index for the info to get lineIndex)Implements com. 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 |
| private LineInfo | |
| public @NotNull Iterable | getLines(int
maximum 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)Implements com. Full line iterator over some lines Note will issue line() to terminate any unterminated lines before iteration |
| public @NotNull Iterable | getLinesInfo(int
maximum trailing blank lines, -1 if trailing EOL should be removed maxTrailingBlankLines, int start line index startLine, int end line index, exclusive endLine)Implements com. Full line iterator with line info Note will issue line() to terminate any unterminated lines before iteration |
| public @NotNull BitFieldSet | getOptionSet()
Implements com. Get current options as set which can be used to modify options |
| public int | getPendingEOL()
Implements com. Get number of EOLs at end of appendable, this is actually number of tail blank lines |
| public int | getPendingSpace()
Implements com. Get number of spaces at end of pending text |
| public @NotNull BasedSequence | getPrefix()
Implements com. Get prefix being applied to all lines, even in pre-formatted sections This is the prefix that will be set after EOL |
| private Pair | Returns: pair of line text range if EOL was added and prefixReturns text range if EOL was appended Note if range == Range.NULL then no line would be added |
| public int | getTrailingBlankLines(int
end line endLine)Implements com. Get trailing blank line count ending on given line |
| public @NotNull LineAppendable | indent()
Implements com. Increase 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 | |
| private boolean | |
| private boolean | |
| public boolean | isPendingSpace()
Implements com. Test if trailing text ends in space or tab |
| private boolean | |
| public boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| public @NotNull Iterator | iterator()
Implements com. Full line iterator NOTE: will not issue line() to terminate any unterminated lines before iteration and will not include unterminated lines in iteration |
| pack-priv int | |
| public @NotNull LineAppendable | line()
Implements com. Add a new line if there was any unterminated text appended or if this is a preformatted region |
| public @NotNull LineAppendable | lineIf(boolean
call predicate)line() if value is true.Implements com. Add a new line, if predicate is true and line() would add an EOL. |
| public @NotNull LineAppendable | lineOnFirstText(boolean value)
Implements com.
|
| public @NotNull LineAppendable | lineWithTrailingSpaces(int
number of trailing spaces to add count)Implements com. 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 int | offset()
Implements com. Get text offset of all output lines, excluding any text for the last line being accumulated |
| private int | Returns: would be offset after adding EOL - 1Returns text offset before EOL if EOL was issued |
| public int | offsetWithPending()
Implements com. Get offset after last append as if EOL was added but without the EOL itself |
| public @NotNull LineAppendable | openPreFormatted(boolean
if true will add the current prefix to first line addPrefixToFirstLine)Implements com. Open preformatted section and suspend content modification |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | popPrefix(boolean
if true prefix will take effect after EOL afterEol)Implements com. Pop a prefix from the stack and set the current prefix |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | pushPrefix()
Implements com. Save the current prefix on the stack |
| private void | |
| private void | |
| private void | |
| pack-priv void | |
| public LineAppendable | removeExtraBlankLines(int
maximum 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)Implements com. Normalize the appendable by removing extra blank lines in the body or at the end of given line range |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | removeLines(int startLine, int endLine)
Implements com.
|
| private int | Returns: index from which line info must be recomputedstart line index to remove startLine, int end line index to remove endLine)Remove lines and return index from which line info must be recomputed |
| public @NotNull LineAppendable | |
| public @NotNull LineAppendable | |
| private void | |
| public @NotNull LineAppendable | |
| public void | |
| public @NotNull LineAppendable | setOptions(int
option flags flags)Overrides default com. Set options on processing text |
| public @NotNull LineAppendable | |
| public void | setPrefixLength(int
index of the line lineIndex, int new prefix length prefixLength)Implements com. Change prefix length for a given line without changing the line content |
| pack-priv int | |
| public @NotNull CharSequence | toSequence(int
maximum blank lines to allow in the text maxBlankLines, int maximum trailing blank lines maxTrailingBlankLines, boolean true if to include prefixes withPrefixes)Implements com. get the resulting text for all lines |
| public String | |
| public @NotNull String | toString(int
maximum blank lines to allow in the text maxBlankLines, int maximum trailing blank lines maxTrailingBlankLines, boolean true if to include prefixes withPrefixes)Implements com. get the resulting text for all lines |
| public @NotNull LineAppendable | unIndent()
Implements com. Decrease the indent level, min level is 0, will terminate the current line if there is unterminated text Note this is equivalent to popPrefix() but with validation
that it is called only on prefixes added by |
| public @NotNull LineAppendable | unIndentNoEol()
Implements com. Decrease the indent level, if there is unterminated text then unindented prefix is to be applied after the next EOL. |