public interface BasedSequence extends IRichSequence<BasedSequence>, BasedOptionsHolder
NOTE: '\0' changed to '�' use NullEncoder.decodeNull mapper to get original null chars.
Since equals is used for comparison of sequences and strings by base sequence manager, a base sequence with NUL may not compare equal to an equivalent unwrapped sequence because NUL chars are not converted. For Strings this is handled by using String.equals() for comparison. For other CharacterSequence types the match will fail if original has NUL in it.
a subSequence() returns a sub-sequence from the original base sequence with corresponding offsets
| Modifier and Type | Interface and Description |
|---|---|
static class |
BasedSequence.EmptyBasedSequence |
BasedOptionsHolder.Options| Modifier and Type | Field and Description |
|---|---|
static BasedSequence |
EMPTY |
static BasedSequence[] |
EMPTY_ARRAY |
static List<BasedSequence> |
EMPTY_LIST |
static BasedSequence[] |
EMPTY_SEGMENTS |
static BasedSequence |
EOL |
static BasedSequence |
LINE_SEP |
static BasedSequence |
NULL |
static BasedSequence |
SPACE |
ANY_EOL, ANY_EOL_SET, BACKSLASH_SET, DECIMAL_DIGITS, EMPTY_INDICES, ENC_NUL, EOL_CHAR, EOL_CHAR1, EOL_CHAR2, EOL_CHARS, EOL_SET, HASH_SET, HEXADECIMAL_DIGITS, LS, LSEP, NBSP, NBSP_CHARS, NUL, OCTAL_DIGITS, SPACE_EOL, SPACE_EOL_SET, SPACE_SET, SPACE_TAB, SPACE_TAB_EOL_SET, SPACE_TAB_NBSP_SET, SPACE_TAB_SET, SPC, SPLIT_INCLUDE_DELIM_PARTS, SPLIT_INCLUDE_DELIMS, SPLIT_SKIP_EMPTY, SPLIT_TRIM_PARTS, SPLIT_TRIM_SKIP_EMPTY, TAB_SET, US, US_CHARS, US_SET, visibleSpacesMap, WHITESPACE, WHITESPACE_CHARS, WHITESPACE_NBSP, WHITESPACE_NBSP_CHARS, WHITESPACE_NBSP_SET, WHITESPACE_NO_EOL_CHARS, WHITESPACE_SETF_APPLICATION_OPTIONS, F_COLLECT_FIRST256_STATS, F_COLLECT_SEGMENTED_STATS, F_FULL_SEGMENTED_SEQUENCES, F_LIBRARY_OPTIONS, F_NO_ANCHORS, F_TREE_SEGMENTED_SEQUENCES, O_COLLECT_FIRST256_STATS, O_COLLECT_SEGMENTED_STATS, O_FULL_SEGMENTED_SEQUENCES, O_NO_ANCHORS, O_TREE_SEGMENTED_SEQUENCES, SEGMENTED_STATS| Modifier and Type | Method and Description |
|---|---|
void |
addSegments(@NotNull IBasedSegmentBuilder<?> builder)
Add segments for this sequence, replacing out of base characters with strings
|
int |
baseColumnAtEnd() |
int |
baseColumnAtIndex(int index) |
int |
baseColumnAtStart() |
int |
baseEndOfLine() |
int |
baseEndOfLine(int index) |
int |
baseEndOfLineAnyEOL() |
int |
baseEndOfLineAnyEOL(int index) |
@NotNull com.vladsch.flexmark.util.misc.Pair<Integer,Integer> |
baseLineColumnAtEnd() |
@NotNull com.vladsch.flexmark.util.misc.Pair<Integer,Integer> |
baseLineColumnAtIndex(int index) |
@NotNull com.vladsch.flexmark.util.misc.Pair<Integer,Integer> |
baseLineColumnAtStart() |
@NotNull Range |
baseLineRangeAtEnd() |
@NotNull Range |
baseLineRangeAtIndex(int index) |
@NotNull Range |
baseLineRangeAtStart() |
int |
baseStartOfLine() |
int |
baseStartOfLine(int index) |
int |
baseStartOfLineAnyEOL() |
int |
baseStartOfLineAnyEOL(int index) |
@NotNull BasedSequence |
baseSubSequence(int startIndex)
Get a portion of the original sequence that this sequence is based on
|
@NotNull BasedSequence |
baseSubSequence(int startIndex,
int endIndex)
Get a portion of this sequence's base sequence
|
boolean |
containsAllOf(@NotNull BasedSequence other)
start/end offset based containment, not textual
|
boolean |
containsSomeOf(@NotNull BasedSequence other)
start/end offset based containment, not textual
|
@NotNull BasedSequence |
extendByAny(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet) |
@NotNull BasedSequence |
extendByAny(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet,
int maxCount)
Extend this based sequence to include characters from underlying based sequence
|
@NotNull BasedSequence |
extendByAnyNot(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet) |
@NotNull BasedSequence |
extendByAnyNot(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet,
int maxCount)
Extend this based sequence to include characters from underlying based sequence not in character set
|
@NotNull BasedSequence |
extendByOneOfAny(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet) |
@NotNull BasedSequence |
extendByOneOfAnyNot(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet) |
default @NotNull BasedSequence |
extendToAny(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet)
Deprecated.
|
default @NotNull BasedSequence |
extendToAny(@NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet,
int maxCount)
Deprecated.
|
@NotNull BasedSequence |
extendToEndOfLine() |
@NotNull BasedSequence |
extendToEndOfLine(boolean includeEol) |
@NotNull BasedSequence |
extendToEndOfLine(@NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars) |
@NotNull BasedSequence |
extendToEndOfLine(@NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars,
boolean includeEol)
Extend in contained based sequence
|
@NotNull BasedSequence |
extendToStartOfLine() |
@NotNull BasedSequence |
extendToStartOfLine(boolean includeEol) |
@NotNull BasedSequence |
extendToStartOfLine(@NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars) |
@NotNull BasedSequence |
extendToStartOfLine(@NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars,
boolean includeEol)
Extend in contained based sequence
|
@NotNull Object |
getBase()
Get the underlying object on which this sequence contents are based
|
@NotNull BasedSequence |
getBaseSequence()
Get the base sequence for the text
|
@NotNull SequenceBuilder |
getBuilder()
Get a sequence builder for this sequence type
|
@NotNull BasedSequence |
getEmptyPrefix()
Get empty prefix to this sequence
|
@NotNull BasedSequence |
getEmptySuffix()
Get empty suffix to this sequence
|
int |
getEndOffset()
Get the end offset of this sequence into
getBaseSequence() and getBase() original text source. |
int |
getIndexOffset(int index)
Get the offset of index in this sequence mapped to offset into
getBaseSequence() and getBase() original text source. |
@NotNull SegmentTree |
getSegmentTree()
Get the segment tree for this sequence
|
@NotNull Range |
getSourceRange()
Get the range of this sequence in original
getBaseSequence() and getBase() original text source. |
int |
getStartOffset()
Get the start offset of this sequence into
getBaseSequence() and getBase() original text source. |
@NotNull BasedSequence |
intersect(@NotNull BasedSequence other)
start/end offset based intersection, not textual
|
boolean |
isBaseCharAt(int index,
@NotNull com.vladsch.flexmark.util.misc.CharPredicate predicate)
Safe, if index out of range but based sequence has characters will return those, else returns '\0'
|
boolean |
isContinuationOf(@NotNull BasedSequence other)
Test if this sequence is a continuation of the given sequence in original source text
|
boolean |
isContinuedBy(@NotNull BasedSequence other)
Test if the given sequence is a continuation of this sequence in original source text
|
@NotNull BasedSequence |
normalizeEndWithEOL(@NotNull ReplacedTextMapper textMapper)
replace any \r\n and \r by \n, append terminating EOL if one is not present
|
@NotNull BasedSequence |
normalizeEOL(@NotNull ReplacedTextMapper textMapper)
replace any \r\n and \r by \n
|
static @NotNull BasedSequence |
of(@Nullable CharSequence charSequence) |
static @NotNull BasedSequence |
of(@Nullable CharSequence charSequence,
int startIndex)
Deprecated.
|
static @NotNull BasedSequence |
of(@Nullable CharSequence charSequence,
int startIndex,
int endIndex)
Deprecated.
|
static @NotNull BasedSequence |
ofSpaces(int count) |
@NotNull BasedSequence |
prefixOf(@NotNull BasedSequence other)
Get the prefix part of this from other, start/end offset based containment, not textual
|
@NotNull BasedSequence |
prefixWithIndent() |
@NotNull BasedSequence |
prefixWithIndent(int maxColumns)
Extend this based sequence to include characters from underlying based sequence
taking tab expansion to 4th spaces into account
|
static @NotNull BasedSequence |
repeatOf(char c,
int count) |
static @NotNull BasedSequence |
repeatOf(@NotNull CharSequence chars,
int count) |
static @NotNull BasedSequence |
repeatOf(@NotNull CharSequence chars,
int startIndex,
int endIndex) |
char |
safeBaseCharAt(int index)
Safe, if index out of range but based sequence has characters will return those, else returns '\0'
|
@NotNull BasedSequence |
spliceAtEnd(@NotNull BasedSequence other)
Splice the given sequence to the end of this one and return a BasedSequence of the result.
|
@NotNull BasedSequence |
subSequence(int startIndex,
int endIndex)
Get a portion of this sequence
|
@NotNull BasedSequence |
suffixOf(@NotNull BasedSequence other)
Get the suffix part of this from other, start/end offset based containment, not textual
|
@NotNull String |
unescape()
Get the unescaped string of this sequence content
|
@NotNull BasedSequence |
unescape(@NotNull ReplacedTextMapper textMapper)
Get the unescaped string of this sequence content
|
@NotNull String |
unescapeNoEntities()
Get the unescaped string of this sequence content without unescaping entities
|
append, append, appendEOL, appendRangesTo, appendRangesTo, appendRangesTo, appendRangesTo, appendSpace, appendSpaces, appendTo, appendTo, appendTo, appendTo, appendTo, appendTo, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, columnAtIndex, countLeading, countLeading, countLeading, countLeading, countLeading, countLeadingColumns, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingSpace, countLeadingSpace, countLeadingSpace, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingWhitespace, countLeadingWhitespace, countLeadingWhitespace, countOf, countOfAny, countOfAny, countOfAny, countOfAnyNot, countOfAnyNot, countOfAnyNot, countOfNotSpaceTab, countOfNotWhitespace, countOfSpaceTab, countOfWhitespace, countTrailing, countTrailing, countTrailing, countTrailing, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingSpace, countTrailingSpace, countTrailingSpace, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingWhitespace, countTrailingWhitespace, countTrailingWhitespace, delete, emptyArray, endCharAt, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endSequence, endSequence, endsWith, endsWith, endsWith, endsWithAnyEOL, endsWithEOL, endsWithIgnoreCase, endsWithSpace, endsWithSpaceTab, endsWithWhitespace, eolEndLength, eolEndLength, eolEndRange, eolLength, eolStartLength, eolStartLength, eolStartRange, equals, equals, equalsIgnoreCase, extractRanges, extractRanges, firstChar, getColumnAtIndex, getLineColumnAtIndex, hashCode, ifNull, ifNullEmptyAfter, ifNullEmptyBefore, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOfAll, indexOfAny, indexOfAny, indexOfAny, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfNot, indexOfNot, indexOfNot, insert, insert, isBlank, isCharAt, isEmpty, isIn, isIn, isNotBlank, isNotEmpty, isNotNull, isNull, lastChar, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfNot, lastIndexOfNot, lastIndexOfNot, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, lineAt, lineAtAnyEOL, lineColumnAtIndex, lineRangeAt, lineRangeAtAnyEOL, matchChars, matchChars, matchChars, matchChars, matchCharsIgnoreCase, matchCharsIgnoreCase, matchCharsReversed, matchCharsReversed, matchCharsReversedIgnoreCase, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCountIgnoreCase, matchedCharCountIgnoreCase, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversedIgnoreCase, matchedCharCountReversedIgnoreCase, matches, matches, matchesIgnoreCase, midCharAt, midSequence, midSequence, normalizeEndWithEOL, normalizeEOL, nullIf, nullIf, nullIf, nullIf, nullIfBlank, nullIfEmpty, nullIfEndsWith, nullIfEndsWith, nullIfEndsWithIgnoreCase, nullIfEndsWithNot, nullIfNot, nullIfNot, nullIfNot, nullIfNotEndsWith, nullIfNotEndsWith, nullIfNotEndsWithIgnoreCase, nullIfNotStartsWith, nullIfNotStartsWith, nullIfNotStartsWithIgnoreCase, nullIfStartsWith, nullIfStartsWith, nullIfStartsWithIgnoreCase, nullIfStartsWithNot, nullSequence, padding, padding, padEnd, padEnd, padStart, padStart, prefixOnceWith, prefixOnceWithEOL, prefixOnceWithSpace, prefixWith, prefixWithEOL, prefixWithSpace, prefixWithSpaces, removePrefix, removePrefix, removePrefixIgnoreCase, removeProperPrefix, removeProperPrefix, removeProperPrefixIgnoreCase, removeProperSuffix, removeProperSuffix, removeProperSuffixIgnoreCase, removeSuffix, removeSuffix, removeSuffixIgnoreCase, replace, replace, safeCharAt, safeSubSequence, safeSubSequence, sequenceOf, sequenceOf, sequenceOf, split, split, split, split, split, split, split, split, splitEOL, splitEOL, splitList, splitList, splitList, splitList, splitList, splitListEOL, splitListEOL, splitListEOL, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWith, startsWithAnyEOL, startsWithEOL, startsWithIgnoreCase, startsWithSpace, startsWithSpaceTab, startsWithWhitespace, subSequence, subSequence, subSequenceAfter, subSequenceBefore, suffixOnceWith, suffixOnceWithEOL, suffixOnceWithSpace, suffixWith, suffixWithEOL, suffixWithSpace, suffixWithSpaces, toLowerCase, toMapped, toNbSp, toSpc, toStringOrNull, toUpperCase, toVisibleWhitespaceString, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trim, trim, trim, trim, trimEnd, trimEnd, trimEnd, trimEnd, trimEndRange, trimEndRange, trimEndRange, trimEndRange, trimEOL, trimLeadBlankLines, trimmed, trimmed, trimmed, trimmed, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEOL, trimmedStart, trimmedStart, trimmedStart, trimmedStart, trimRange, trimRange, trimRange, trimRange, trimStart, trimStart, trimStart, trimStart, trimStartRange, trimStartRange, trimStartRange, trimStartRange, trimTailBlankLines, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToEndOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLine, trimToStartOfLinecharAt, chars, codePoints, length, toStringcompareToblankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, blankLinesRemovedRanges, columnAtIndex, columnsToNextTabStop, compare, compare, compare, compareReversed, containedBy, containedBy, containsAny, containsAny, containsAnyNot, containsAnyNot, containsAnyNot, countLeading, countLeading, countLeading, countLeadingColumns, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpace, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotSpaceTab, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingNotWhitespace, countLeadingSpace, countLeadingSpace, countLeadingSpace, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingSpaceTab, countLeadingWhitespace, countLeadingWhitespace, countLeadingWhitespace, countOfAny, countOfAny, countOfAny, countOfAnyNot, countOfAnyNot, countOfAnyNot, countOfNotSpaceTab, countOfNotWhitespace, countOfSpaceTab, countOfWhitespace, countTrailing, countTrailing, countTrailing, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpace, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotSpaceTab, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingNotWhitespace, countTrailingSpace, countTrailingSpace, countTrailingSpace, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingSpaceTab, countTrailingWhitespace, countTrailingWhitespace, countTrailingWhitespace, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endsWith, endsWith, endsWith, endsWithAnyEOL, endsWithEOL, endsWithSpace, endsWithSpaceTab, endsWithWhitespace, eolEndLength, eolEndLength, eolEndRange, eolStartLength, eolStartRange, equals, expandTo, firstChar, getVisibleSpacesMap, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOfAll, indexOfAny, indexOfAny, indexOfAny, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfNot, indexOfNot, indexOfNot, isBlank, isEmpty, isNotBlank, isNotEmpty, isVisibleWhitespace, lastChar, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfNot, lastIndexOfNot, lastIndexOfNot, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, leadingBlankLinesRange, lineColumnAtIndex, lineRangeAt, lineRangeAtAnyEOL, matchChars, matchChars, matchChars, matchChars, matchCharsIgnoreCase, matchCharsIgnoreCase, matchCharsReversed, matchCharsReversed, matchCharsReversedIgnoreCase, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCount, matchedCharCountIgnoreCase, matchedCharCountIgnoreCase, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversed, matchedCharCountReversedIgnoreCase, matchedCharCountReversedIgnoreCase, matches, matches, matchesIgnoreCase, padEnd, padEnd, padStart, padStart, parseIntOrDefault, parseIntOrDefault, parseIntOrNull, parseIntOrNull, parseLongOrNull, parseLongOrNull, parseNumberOrNull, parseNumberPrefixOrNull, parseUnsignedIntOrDefault, parseUnsignedIntOrDefault, parseUnsignedIntOrNull, parseUnsignedIntOrNull, safeCharAt, split, split, split, split, split, splitEOL, splitEOL, splitList, splitList, splitList, splitList, splitList, splitListEOL, splitListEOL, splitListEOL, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWith, startsWithAnyEOL, startsWithEOL, startsWithSpace, startsWithSpaceTab, startsWithWhitespace, subSequence, subSequence, subSequenceAfter, subSequenceBefore, subSequenceBeforeAfter, toStringArray, toVisibleWhitespaceString, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trailingBlankLinesRange, trim, trim, trim, trim, trimEnd, trimEnd, trimEnd, trimEnd, trimEndRange, trimEndRange, trimEndRange, trimEndRange, trimEOL, trimLeadBlankLines, trimmed, trimmed, trimmed, trimmed, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEOL, trimmedStart, trimmedStart, trimmedStart, trimmedStart, trimRange, trimRange, trimRange, trimRange, trimStart, trimStart, trimStart, trimStart, trimStartRange, trimStartRange, trimStartRange, trimStartRange, trimTailBlankLines, truncateTo, validateIndex, validateIndexInclusiveEnd, validateStartEndallOptions, anyOptions, getOption, getOptionFlags, getOptions, optionsToStringstatic final BasedSequence NULL
static final BasedSequence EMPTY
static final BasedSequence EOL
static final BasedSequence SPACE
static final List<BasedSequence> EMPTY_LIST
static final BasedSequence[] EMPTY_ARRAY
static final BasedSequence[] EMPTY_SEGMENTS
static final BasedSequence LINE_SEP
@NotNull static @NotNull BasedSequence of(@Nullable @Nullable CharSequence charSequence)
@NotNull @Deprecated static @NotNull BasedSequence of(@Nullable @Nullable CharSequence charSequence, int startIndex)
@NotNull @Deprecated static @NotNull BasedSequence of(@Nullable @Nullable CharSequence charSequence, int startIndex, int endIndex)
@NotNull static @NotNull BasedSequence ofSpaces(int count)
@NotNull static @NotNull BasedSequence repeatOf(char c, int count)
@NotNull static @NotNull BasedSequence repeatOf(@NotNull @NotNull CharSequence chars, int count)
@NotNull static @NotNull BasedSequence repeatOf(@NotNull @NotNull CharSequence chars, int startIndex, int endIndex)
@NotNull @NotNull SequenceBuilder getBuilder()
IRichSequencegetBuilder in interface IRichSequence<BasedSequence>@NotNull @NotNull Object getBase()
@NotNull @NotNull BasedSequence getBaseSequence()
int getStartOffset()
getBaseSequence() and getBase() original text source.int getEndOffset()
getBaseSequence() and getBase() original text source.int getIndexOffset(int index)
getBaseSequence() and getBase() original text source.
NOTE: if the character at given index does not equal the corresponding character in the base sequence then this method should return -1 otherwise segmented based sequence will be created for original base characterindex - index for which to get the offset in original sourcevoid addSegments(@NotNull
@NotNull IBasedSegmentBuilder<?> builder)
builder - builder@NotNull @NotNull SegmentTree getSegmentTree()
@NotNull @NotNull Range getSourceRange()
getBaseSequence() and getBase() original text source.@NotNull @NotNull BasedSequence subSequence(int startIndex, int endIndex)
subSequence in interface CharSequencesubSequence in interface IRichSequence<BasedSequence>startIndex - offset from startIndex of this sequenceendIndex - offset from startIndex of this sequence@NotNull @NotNull BasedSequence baseSubSequence(int startIndex, int endIndex)
NOTE: this means that if this sequence applies modifications to the original sequence then these modifications are NOT be applied to the returned sequence.
NOTE: It should only be implemented in classes which provide base sequences such as CharSubSequence and SubSequence others use inherited implementation of BasedSequenceImpl
startIndex - offset from 0 of original sequenceendIndex - offset from 0 of original sequence@NotNull @NotNull BasedSequence baseSubSequence(int startIndex)
startIndex - offset from 0 of original sequencechar safeBaseCharAt(int index)
Allows peeking into preceding/following characters to the ones contained in this sequence
index - index in stringboolean isBaseCharAt(int index,
@NotNull
@NotNull com.vladsch.flexmark.util.misc.CharPredicate predicate)
Allows peeking into preceding/following characters to the ones contained in this sequence
index - index in stringpredicate - character set predicate@NotNull @NotNull BasedSequence getEmptyPrefix()
@NotNull @NotNull BasedSequence getEmptySuffix()
@NotNull @NotNull String unescape()
@NotNull @NotNull String unescapeNoEntities()
@NotNull @NotNull BasedSequence unescape(@NotNull @NotNull ReplacedTextMapper textMapper)
textMapper - replaced text mapper which will be uses to map unescaped index to original source index@NotNull @NotNull BasedSequence normalizeEOL(@NotNull @NotNull ReplacedTextMapper textMapper)
textMapper - replaced text mapper which will be uses to map unescaped index to original source index@NotNull @NotNull BasedSequence normalizeEndWithEOL(@NotNull @NotNull ReplacedTextMapper textMapper)
textMapper - replaced text mapper which will be uses to map unescaped index to original source indexboolean isContinuedBy(@NotNull
@NotNull BasedSequence other)
other - sequence to testboolean isContinuationOf(@NotNull
@NotNull BasedSequence other)
other - sequence to test@NotNull @NotNull BasedSequence spliceAtEnd(@NotNull @NotNull BasedSequence other)
other - sequence to append to end of this oneassertion will fail if the other sequence is not a continuation of this one
boolean containsAllOf(@NotNull
@NotNull BasedSequence other)
other - based sequence from the same baseboolean containsSomeOf(@NotNull
@NotNull BasedSequence other)
other - based sequence from the same base@NotNull @NotNull BasedSequence prefixOf(@NotNull @NotNull BasedSequence other)
other - based sequence from the same base@NotNull @NotNull BasedSequence suffixOf(@NotNull @NotNull BasedSequence other)
other - based sequence from the same base@NotNull @NotNull BasedSequence intersect(@NotNull @NotNull BasedSequence other)
other - based sequence from the same parent@NotNull @NotNull BasedSequence extendByAny(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet, int maxCount)
charSet - set of characters to includemaxCount - maximum extra characters to include@NotNull @NotNull BasedSequence extendByAny(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet)
@NotNull @NotNull BasedSequence extendByOneOfAny(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet)
@NotNull @NotNull BasedSequence extendByAnyNot(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet, int maxCount)
charSet - set of characters to includemaxCount - maximum extra characters to include@NotNull @NotNull BasedSequence extendByAnyNot(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet)
@NotNull @NotNull BasedSequence extendByOneOfAnyNot(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet)
@NotNull @Deprecated default @NotNull BasedSequence extendToAny(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet, int maxCount)
@NotNull @Deprecated default @NotNull BasedSequence extendToAny(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate charSet)
@NotNull @NotNull BasedSequence extendToEndOfLine(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars, boolean includeEol)
eolChars - characters to consider as EOL, note IRichSequence.eolStartLength(int) IRichSequence.eolEndLength(int) should report length of EOL found if length > 1includeEol - if to include the eol in the string@NotNull @NotNull BasedSequence extendToEndOfLine(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars)
@NotNull @NotNull BasedSequence extendToEndOfLine(boolean includeEol)
@NotNull @NotNull BasedSequence extendToEndOfLine()
@NotNull @NotNull BasedSequence extendToStartOfLine(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars, boolean includeEol)
eolChars - characters to consider as EOL, note IRichSequence.eolStartLength(int) IRichSequence.eolEndLength(int) should report length of EOL found if length > 1includeEol - if to include the eol in the string@NotNull @NotNull BasedSequence extendToStartOfLine(@NotNull @NotNull com.vladsch.flexmark.util.misc.CharPredicate eolChars)
@NotNull @NotNull BasedSequence extendToStartOfLine(boolean includeEol)
@NotNull @NotNull BasedSequence extendToStartOfLine()
@NotNull @NotNull BasedSequence prefixWithIndent(int maxColumns)
maxColumns - maximum columns to include, default Integer.MAX_VALUE@NotNull @NotNull BasedSequence prefixWithIndent()
@NotNull @NotNull com.vladsch.flexmark.util.misc.Pair<Integer,Integer> baseLineColumnAtIndex(int index)
@NotNull @NotNull Range baseLineRangeAtIndex(int index)
int baseEndOfLine(int index)
int baseEndOfLineAnyEOL(int index)
int baseStartOfLine(int index)
int baseStartOfLineAnyEOL(int index)
int baseColumnAtIndex(int index)
@NotNull @NotNull com.vladsch.flexmark.util.misc.Pair<Integer,Integer> baseLineColumnAtStart()
@NotNull @NotNull com.vladsch.flexmark.util.misc.Pair<Integer,Integer> baseLineColumnAtEnd()
int baseEndOfLine()
int baseEndOfLineAnyEOL()
int baseStartOfLine()
int baseStartOfLineAnyEOL()
@NotNull @NotNull Range baseLineRangeAtStart()
@NotNull @NotNull Range baseLineRangeAtEnd()
int baseColumnAtEnd()
int baseColumnAtStart()
Copyright © 2020. All rights reserved.