public class Seg extends Object
Out of base text offsets are limited to 1GB. Upper bit is used to store repeated and ascii only flags.
| Modifier and Type | Field and Description |
|---|---|
static Seg |
ANCHOR_0 |
static int |
F_TEXT_OPTION |
static int |
MAX_TEXT_OFFSET |
static Seg |
NULL |
| Modifier and Type | Method and Description |
|---|---|
int |
getEnd() |
@NotNull Range |
getRange() |
int |
getSegEnd() |
int |
getSegStart() |
int |
getStart() |
int |
getTextEnd() |
static int |
getTextEnd(int startOffset,
boolean isRepeatedText) |
static int |
getTextOffset(int startOffset) |
int |
getTextStart() |
static int |
getTextStart(int startOffset,
boolean isFirst256) |
boolean |
isAnchor()
Test segment type being from original sequence
|
boolean |
isBase()
Test segment type being from original sequence
|
boolean |
isFirst256Start() |
static boolean |
isFirst256Start(int start) |
boolean |
isNull() |
boolean |
isRepeatedTextEnd() |
static boolean |
isRepeatedTextEnd(int end) |
boolean |
isText() |
int |
length()
Return length of text or if text is null span of range
|
static @NotNull Seg |
segOf(int startOffset,
int endOffset) |
static @NotNull Seg |
textOf(int startOffset,
int endOffset,
boolean isFirst256,
boolean isRepeatedText) |
String |
toString() |
String |
toString(@NotNull CharSequence allText) |
public static final Seg NULL
public static final Seg ANCHOR_0
public static final int MAX_TEXT_OFFSET
public static final int F_TEXT_OPTION
public int getStart()
public int getEnd()
public int getSegStart()
public int getSegEnd()
public int getTextStart()
public static int getTextOffset(int startOffset)
public int getTextEnd()
public boolean isFirst256Start()
public static boolean isFirst256Start(int start)
public boolean isRepeatedTextEnd()
public static boolean isRepeatedTextEnd(int end)
public boolean isText()
public boolean isBase()
public boolean isAnchor()
public boolean isNull()
@NotNull public @NotNull Range getRange()
public int length()
public String toString(@NotNull @NotNull CharSequence allText)
@NotNull public static @NotNull Seg segOf(int startOffset, int endOffset)
public static int getTextStart(int startOffset,
boolean isFirst256)
public static int getTextEnd(int startOffset,
boolean isRepeatedText)
@NotNull public static @NotNull Seg textOf(int startOffset, int endOffset, boolean isFirst256, boolean isRepeatedText)
Copyright © 2020. All rights reserved.