Top Description Inners Fields Constructors Methods
com.vladsch.flexmark.util.sequence

public final Class LineInfo

extends Object
Class Inheritance
Imports
com.vladsch.flexmark.util.misc.BitField, .BitFieldSet, .Utils, org.jetbrains.annotations.NotNull

Line information in LineAppendable

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
public static enum

Field Summary

Modifier and TypeField and Description
public static final LineInfo.Flags
public static final LineInfo.Flags
public static final int
public static final int
public static final int
public final int
public final int
public final int
public final CharSequence
public static final LineInfo
public final int
public static final LineInfo.Flags
public final int
public final int
public final int
public final int

Constructor Summary

AccessConstructor and Description
private
LineInfo(@NotNull 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

Modifier and TypeMethod and Description
public static @NotNull LineInfo
create(@NotNull CharSequence line, int prefixLength, int textLength, int length, boolean isBlankPrefix, boolean isBlankText, @NotNull LineInfo.Preformatted preformatted)

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

public static @NotNull LineInfo
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull BasedSequence
public @NotNull LineInfo.Preformatted
public @NotNull BasedSequence
public int
public @NotNull BasedSequence
public int
public boolean
public boolean
public boolean

Returns:

true if the line is a blank line
isBlankTextAndPrefix
()

Note

a line which consists of any prefix and blank text is considered a blank line

public boolean
public boolean
public boolean
public boolean

Returns:

true if need to update
needAggregateUpdate
(LineInfo
line info
other
)

See if replacing this line info with another requires updating all following line info because of aggregation change

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

BLANK_PREFIXback to summary
public static final LineInfo.Flags BLANK_PREFIX
BLANK_TEXTback to summary
public static final LineInfo.Flags BLANK_TEXT
F_BLANK_PREFIXback to summary
public static final int F_BLANK_PREFIX
F_BLANK_TEXTback to summary
public static final int F_BLANK_TEXT
F_PREFORMATTEDback to summary
public static final int F_PREFORMATTED
flagsback to summary
public final int flags
indexback to summary
public final int index
lengthback to summary
public final int length
lineSeqback to summary
public final CharSequence lineSeq
NULLback to summary
public static final LineInfo NULL
prefixLengthback to summary
public final int prefixLength
PREFORMATTEDback to summary
public static final LineInfo.Flags PREFORMATTED
sumLengthback to summary
public final int sumLength
sumPrefixLengthback to summary
public final int sumPrefixLength
sumTextLengthback to summary
public final int sumTextLength
textLengthback to summary
public final int textLength

Constructor Detail

LineInfoback to summary
private LineInfo(@NotNull 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 Detail

createback to summary
public static @NotNull LineInfo create(@NotNull CharSequence line, int prefixLength, int textLength, int length, boolean isBlankPrefix, boolean isBlankText, @NotNull LineInfo.Preformatted preformatted)
Annotations
@NotNull
createback to summary
public static @NotNull LineInfo create(@NotNull CharSequence line, @NotNull LineInfo prevInfo, int prefixLength, int textLength, int length, boolean isBlankPrefix, boolean isBlankText, @NotNull LineInfo.Preformatted preformatted)
Annotations
@NotNull
createback to summary
public static @NotNull LineInfo create(@NotNull LineInfo prevInfo, @NotNull LineInfo info)
Annotations
@NotNull
getEOLback to summary
public @NotNull BasedSequence getEOL()
Annotations
@NotNull
getLineback to summary
public @NotNull BasedSequence getLine()
Annotations
@NotNull
getLineNoEOLback to summary
public @NotNull BasedSequence getLineNoEOL()
Annotations
@NotNull
getPrefixback to summary
public @NotNull BasedSequence getPrefix()
Annotations
@NotNull
getPreformattedback to summary
public @NotNull LineInfo.Preformatted getPreformatted()
Annotations
@NotNull
getTextback to summary
public @NotNull BasedSequence getText()
Annotations
@NotNull
getTextEndback to summary
public int getTextEnd()
getTextNoEOLback to summary
public @NotNull BasedSequence getTextNoEOL()
Annotations
@NotNull
getTextStartback to summary
public int getTextStart()
isBlankPrefixback to summary
public boolean isBlankPrefix()
isBlankTextback to summary
public boolean isBlankText()
isBlankTextAndPrefixback to summary
public boolean isBlankTextAndPrefix()

Note

a line which consists of any prefix and blank text is considered a blank line

Returns:boolean

true if the line is a blank line

isNotNullback to summary
public boolean isNotNull()
isNullback to summary
public boolean isNull()
isPreformattedback to summary
public boolean isPreformatted()
needAggregateUpdateback to summary
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:LineInfo

line info

Returns:boolean

true if need to update

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
com.vladsch.flexmark.util.sequence back to summary

public final Enum LineInfo.Flags

extends Enum<LineInfo.Flags>
implements BitField
Class Inheritance
All Implemented Interfaces
com.vladsch.flexmark.util.misc.BitField

Field Summary

Modifier and TypeField and Description
pack-priv final int
public static final LineInfo.Flags
public static final LineInfo.Flags
public static final LineInfo.Flags

Constructor Summary

AccessConstructor and Description
private
private
Flags(int bits)

Method Summary

Modifier and TypeMethod and Description
public int
public static LineInfo.Flags
public static LineInfo.Flags[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

bitsback to summary
pack-priv final int bits
BLANK_PREFIXback to summary
public static final LineInfo.Flags BLANK_PREFIX
BLANK_TEXTback to summary
public static final LineInfo.Flags BLANK_TEXT
PREFORMATTEDback to summary
public static final LineInfo.Flags PREFORMATTED

Constructor Detail

Flagsback to summary
private Flags()
Flagsback to summary
private Flags(int bits)

Method Detail

getBitsback to summary
public int getBits()

Implements com.vladsch.flexmark.util.misc.BitField.getBits.

Annotations
@Override
valueOfback to summary
public static LineInfo.Flags valueOf(String name)
valuesback to summary
public static LineInfo.Flags[] values()
com.vladsch.flexmark.util.sequence back to summary

public final Enum LineInfo.Preformatted

extends Enum<LineInfo.Preformatted>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final LineInfo.Preformatted
public static final LineInfo.Preformatted
public static final LineInfo.Preformatted
pack-priv final int
public static final LineInfo.Preformatted

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static @NotNull LineInfo.Preformatted
get(int flags)

public static LineInfo.Preformatted
public static LineInfo.Preformatted[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BODYback to summary
public static final LineInfo.Preformatted BODY
FIRSTback to summary
public static final LineInfo.Preformatted FIRST
LASTback to summary
public static final LineInfo.Preformatted LAST
maskback to summary
pack-priv final int mask
NONEback to summary
public static final LineInfo.Preformatted NONE

Constructor Detail

Preformattedback to summary
private Preformatted()

Method Detail

getback to summary
pack-priv static @NotNull LineInfo.Preformatted get(int flags)
Annotations
@NotNull
valueOfback to summary
public static LineInfo.Preformatted valueOf(String name)
valuesback to summary
public static LineInfo.Preformatted[] values()