Class Seg
- java.lang.Object
-
- com.vladsch.flexmark.util.sequence.builder.Seg
-
public class Seg extends Object
Representation of a segment part in a segment list for a sequence it is a Range, either in the base sequence or in the out of base characters for the builder.Out of base text offsets are limited to 1GB. Upper bit is used to store repeated and ascii only flags.
-
-
Field Summary
Fields Modifier and Type Field Description static SegANCHOR_0static intF_TEXT_OPTIONstatic intMAX_TEXT_OFFSETstatic SegNULL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetEnd()@NotNull RangegetRange()intgetSegEnd()intgetSegStart()intgetStart()intgetTextEnd()static intgetTextEnd(int startOffset, boolean isRepeatedText)static intgetTextOffset(int startOffset)intgetTextStart()static intgetTextStart(int startOffset, boolean isFirst256)booleanisAnchor()Test segment type being from original sequencebooleanisBase()Test segment type being from original sequencebooleanisFirst256Start()static booleanisFirst256Start(int start)booleanisNull()booleanisRepeatedTextEnd()static booleanisRepeatedTextEnd(int end)booleanisText()intlength()Return length of text or if text is null span of rangestatic @NotNull SegsegOf(int startOffset, int endOffset)static @NotNull SegtextOf(int startOffset, int endOffset, boolean isFirst256, boolean isRepeatedText)StringtoString()StringtoString(@NotNull CharSequence allText)
-
-
-
Field Detail
-
NULL
public static final Seg NULL
-
ANCHOR_0
public static final Seg ANCHOR_0
-
MAX_TEXT_OFFSET
public static final int MAX_TEXT_OFFSET
- See Also:
- Constant Field Values
-
F_TEXT_OPTION
public static final int F_TEXT_OPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStart
public int getStart()
-
getEnd
public int getEnd()
-
getSegStart
public int getSegStart()
-
getSegEnd
public int getSegEnd()
-
getTextStart
public int getTextStart()
-
getTextOffset
public static int getTextOffset(int startOffset)
-
getTextEnd
public int getTextEnd()
-
isFirst256Start
public boolean isFirst256Start()
-
isFirst256Start
public static boolean isFirst256Start(int start)
-
isRepeatedTextEnd
public boolean isRepeatedTextEnd()
-
isRepeatedTextEnd
public static boolean isRepeatedTextEnd(int end)
-
isText
public boolean isText()
-
isBase
public boolean isBase()
Test segment type being from original sequence- Returns:
- true if it is
-
isAnchor
public boolean isAnchor()
Test segment type being from original sequence- Returns:
- true if it is
-
isNull
public boolean isNull()
-
getRange
@NotNull public @NotNull Range getRange()
-
length
public int length()
Return length of text or if text is null span of range- Returns:
- length of this part in the sequence
-
toString
public String toString(@NotNull @NotNull CharSequence allText)
-
segOf
@NotNull public static @NotNull Seg segOf(int startOffset, int endOffset)
-
getTextStart
public static int getTextStart(int startOffset, boolean isFirst256)
-
getTextEnd
public static int getTextEnd(int startOffset, boolean isRepeatedText)
-
textOf
@NotNull public static @NotNull Seg textOf(int startOffset, int endOffset, boolean isFirst256, boolean isRepeatedText)
-
-