Class LineInfo


  • public final class LineInfo
    extends Object
    Line information in LineAppendable
    • Field Detail

      • F_PREFORMATTED

        public static final int F_PREFORMATTED
      • F_BLANK_PREFIX

        public static final int F_BLANK_PREFIX
      • F_BLANK_TEXT

        public static final int F_BLANK_TEXT
      • NULL

        public static final LineInfo NULL
      • index

        public final int index
      • prefixLength

        public final int prefixLength
      • textLength

        public final int textLength
      • length

        public final int length
      • sumPrefixLength

        public final int sumPrefixLength
      • sumTextLength

        public final int sumTextLength
      • sumLength

        public final int sumLength
      • flags

        public final int flags
    • Method Detail

      • needAggregateUpdate

        public boolean needAggregateUpdate​(LineInfo other)
        See if replacing this line info with another requires updating all following line info because of aggregation change
        Parameters:
        other - line info
        Returns:
        true if need to update
      • isNull

        public boolean isNull()
      • isNotNull

        public boolean isNotNull()
      • isBlankPrefix

        public boolean isBlankPrefix()
      • isBlankText

        public boolean isBlankText()
      • isPreformatted

        public boolean isPreformatted()
      • isBlankTextAndPrefix

        public boolean isBlankTextAndPrefix()
        NOTE: a line which consists of any prefix and blank text is considered a blank line
        Returns:
        true if the line is a blank line
      • getTextStart

        public int getTextStart()
      • getTextEnd

        public int getTextEnd()
      • getTextNoEOL

        @NotNull
        public @NotNull BasedSequence getTextNoEOL()
      • getLineNoEOL

        @NotNull
        public @NotNull BasedSequence getLineNoEOL()
      • create

        @NotNull
        public static @NotNull LineInfo create​(@NotNull
                                               @NotNull CharSequence line,
                                               int prefixLength,
                                               int textLength,
                                               int length,
                                               boolean isBlankPrefix,
                                               boolean isBlankText,
                                               @NotNull
                                               @NotNull LineInfo.Preformatted preformatted)
      • create

        @NotNull
        public static @NotNull LineInfo create​(@NotNull
                                               @NotNull CharSequence line,
                                               @NotNull
                                               @NotNull LineInfo prevInfo,
                                               int prefixLength,
                                               int textLength,
                                               int length,
                                               boolean isBlankPrefix,
                                               boolean isBlankText,
                                               @NotNull
                                               @NotNull LineInfo.Preformatted preformatted)
      • create

        @NotNull
        public static @NotNull LineInfo create​(@NotNull
                                               @NotNull LineInfo prevInfo,
                                               @NotNull
                                               @NotNull LineInfo info)