Class LineInfo
- java.lang.Object
-
- com.vladsch.flexmark.util.sequence.LineInfo
-
public final class LineInfo extends java.lang.Object
Line information in LineAppendable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LineInfo.Flags
static class
LineInfo.Preformatted
-
Field Summary
Fields Modifier and Type Field Description static LineInfo.Flags
BLANK_PREFIX
static LineInfo.Flags
BLANK_TEXT
static int
F_BLANK_PREFIX
static int
F_BLANK_TEXT
static int
F_PREFORMATTED
int
flags
int
index
int
length
java.lang.CharSequence
lineSeq
static LineInfo
NULL
int
prefixLength
static LineInfo.Flags
PREFORMATTED
int
sumLength
int
sumPrefixLength
int
sumTextLength
int
textLength
-
Constructor Summary
Constructors Modifier Constructor Description private
LineInfo(@NotNull java.lang.CharSequence lineSeq, int index, int prefixLength, int textLength, int length, int sumPrefixLength, int sumTextLength, int sumLength, boolean isBlankPrefix, boolean isBlankText, @NotNull LineInfo.Preformatted preformatted)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull LineInfo
create(@NotNull LineInfo prevInfo, @NotNull LineInfo info)
static @NotNull LineInfo
create(@NotNull java.lang.CharSequence line, int prefixLength, int textLength, int length, boolean isBlankPrefix, boolean isBlankText, @NotNull LineInfo.Preformatted preformatted)
static @NotNull LineInfo
create(@NotNull java.lang.CharSequence line, @NotNull LineInfo prevInfo, int prefixLength, int textLength, int length, boolean isBlankPrefix, boolean isBlankText, @NotNull LineInfo.Preformatted preformatted)
@NotNull BasedSequence
getEOL()
@NotNull BasedSequence
getLine()
@NotNull BasedSequence
getLineNoEOL()
@NotNull BasedSequence
getPrefix()
@NotNull LineInfo.Preformatted
getPreformatted()
@NotNull BasedSequence
getText()
int
getTextEnd()
@NotNull BasedSequence
getTextNoEOL()
int
getTextStart()
boolean
isBlankPrefix()
boolean
isBlankText()
boolean
isBlankTextAndPrefix()
NOTE: a line which consists of any prefix and blank text is considered a blank lineboolean
isNotNull()
boolean
isNull()
boolean
isPreformatted()
boolean
needAggregateUpdate(LineInfo other)
See if replacing this line info with another requires updating all following line info because of aggregation changejava.lang.String
toString()
-
-
-
Field Detail
-
BLANK_PREFIX
public static final LineInfo.Flags BLANK_PREFIX
-
BLANK_TEXT
public static final LineInfo.Flags BLANK_TEXT
-
PREFORMATTED
public static final LineInfo.Flags PREFORMATTED
-
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
-
lineSeq
public final java.lang.CharSequence lineSeq
-
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
-
-
Constructor Detail
-
LineInfo
private LineInfo(@NotNull @NotNull java.lang.CharSequence lineSeq, int index, int prefixLength, int textLength, int length, int sumPrefixLength, int sumTextLength, int sumLength, boolean isBlankPrefix, boolean isBlankText, @NotNull @NotNull LineInfo.Preformatted preformatted)
-
-
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()
-
getPreformatted
@NotNull public @NotNull LineInfo.Preformatted getPreformatted()
-
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()
-
getLine
@NotNull public @NotNull BasedSequence getLine()
-
getPrefix
@NotNull public @NotNull BasedSequence getPrefix()
-
getTextNoEOL
@NotNull public @NotNull BasedSequence getTextNoEOL()
-
getText
@NotNull public @NotNull BasedSequence getText()
-
getLineNoEOL
@NotNull public @NotNull BasedSequence getLineNoEOL()
-
getEOL
@NotNull public @NotNull BasedSequence getEOL()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
create
@NotNull public static @NotNull LineInfo create(@NotNull @NotNull java.lang.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 java.lang.CharSequence line, @NotNull @NotNull LineInfo prevInfo, int prefixLength, int textLength, int length, boolean isBlankPrefix, boolean isBlankText, @NotNull @NotNull LineInfo.Preformatted preformatted)
-
-