public interface BasedSequence extends RichCharSequence<BasedSequence>
| Modifier and Type | Interface and Description |
|---|---|
static class |
BasedSequence.EmptyBasedSequence |
| 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 |
NULL |
static BasedSequence |
SPACE |
EOL_CHAR, EOL_CHAR1, EOL_CHAR2, EOL_CHARS, SPLIT_INCLUDE_DELIM_PARTS, SPLIT_INCLUDE_DELIMS, SPLIT_SKIP_EMPTY, SPLIT_TRIM_PARTS, SPLIT_TRIM_SKIP_EMPTY, WHITESPACE_CHARS, WHITESPACE_NBSP_CHARS, WHITESPACE_NO_EOL_CHARS| Modifier and Type | Method and Description |
|---|---|
BasedSequence |
baseSubSequence(int start)
Get a portion of the original sequence that this sequence is based on
|
BasedSequence |
baseSubSequence(int start,
int end)
Get a portion of the original sequence that this sequence is based on
|
boolean |
containsAllOf(BasedSequence other)
start/end offset based containment, not textual
|
boolean |
containsSomeOf(BasedSequence other)
start/end offset based containment, not textual
|
default BasedSequence |
extendByAny(CharSequence charSet) |
BasedSequence |
extendByAny(CharSequence charSet,
int maxCount)
Extend this based sequence to include characters from underlying based sequence
|
default BasedSequence |
extendByOneOfAny(CharSequence charSet) |
default BasedSequence |
extendToAny(CharSequence charSet) |
BasedSequence |
extendToAny(CharSequence charSet,
int maxCount)
Extend this based sequence to include up to the next character from underlying based sequence
|
Object |
getBase()
Get the underlying object on which this sequence contents are based
|
BasedSequence |
getBaseSequence()
Get the base sequence for the text
|
BasedSequence |
getEmptyPrefix()
Get empty prefix to this sequence
|
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. |
Range |
getIndexRange(int startOffset,
int endOffset)
Get the range of indices that map into
getBaseSequence() with startOffset and endOffset |
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. |
BasedSequence |
intersect(BasedSequence other)
start/end offset based intersection, not textual
|
boolean |
isContinuationOf(BasedSequence other)
Test if this sequence is a continuation of the given sequence in original source text
|
boolean |
isContinuedBy(BasedSequence other)
Test if the given sequence is a continuation of this sequence in original source text
|
BasedSequence |
normalizeEndWithEOL(ReplacedTextMapper textMapper)
replace any \r\n and \r by \n, append terminating EOL if one is not present
|
BasedSequence |
normalizeEOL(ReplacedTextMapper textMapper)
replace any \r\n and \r by \n
|
BasedSequence |
prefixOf(BasedSequence other)
Get the prefix part of this from other, start/end offset based containment, not textual
|
default BasedSequence |
prefixWithIndent() |
BasedSequence |
prefixWithIndent(int maxColumns)
Extend this based sequence to include characters from underlying based sequence
taking tab expansion to 4th spaces into account
|
char |
safeBaseCharAt(int index)
Safe, if index out of range but based sequence has characters will return those, else returns '\0'
|
char |
safeCharAt(int index)
Safe, if index out of range returns '\0'
|
BasedSequence |
spliceAtEnd(BasedSequence other)
Splice the given sequence to the end of this one and return a BasedSequence of the result.
|
BasedSequence |
suffixOf(BasedSequence other)
Get the suffix part of this from other, start/end offset based containment, not textual
|
String |
unescape()
Get the unescaped string of this sequence content
|
BasedSequence |
unescape(ReplacedTextMapper textMapper)
Get the unescaped string of this sequence content
|
String |
unescapeNoEntities()
Get the unescaped string of this sequence content without unescaping entities
|
append, appendTo, appendTo, appendTo, countLeading, countLeading, countLeading, countLeading, countLeading, countLeading, countLeading, countLeadingColumns, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNot, countLeadingNot, countOf, countOf, countOf, countOf, countOfAny, countOfAny, countOfAny, countOfAnyNot, countOfAnyNot, countOfAnyNot, countOfNot, countOfNot, countOfNot, countOfNot, countTrailing, countTrailing, countTrailing, countTrailing, countTrailing, countTrailing, countTrailing, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNot, countTrailingNot, emptyArray, endCharAt, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endSequence, endSequence, endsWith, endsWith, endsWithIgnoreCase, eolLength, eolLength, equals, equalsIgnoreCase, firstChar, getColumnAtIndex, getLineColumnAtIndex, ifNull, ifNullEmptyAfter, ifNullEmptyBefore, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOfAll, indexOfAny, indexOfAny, indexOfAny, indexOfAny, indexOfAny, indexOfAny, indexOfAny, indexOfAny, indexOfAny, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfAnyNot, indexOfNot, indexOfNot, indexOfNot, isBlank, isEmpty, isNotNull, isNull, lastChar, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAny, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfAnyNot, lastIndexOfNot, lastIndexOfNot, lastIndexOfNot, lineAt, lineAtAnyEOL, matchChars, matchChars, matchChars, matchChars, matchCharsIgnoreCase, matchCharsIgnoreCase, matchCharsReversed, matchCharsReversed, matchCharsReversedIgnoreCase, matches, matches, matchesIgnoreCase, midCharAt, midSequence, midSequence, normalizeEndWithEOL, normalizeEOL, nullIf, nullIf, nullIfBlank, nullIfEmpty, nullIfEndsWith, nullIfEndsWithNot, nullIfNot, nullIfStartsWith, nullIfStartsWithNot, nullSequence, padEnd, padEnd, padStart, padStart, removePrefix, removePrefix, removePrefixIgnoreCase, removeProperPrefix, removeProperPrefix, removeProperPrefixIgnoreCase, removeProperSuffix, removeProperSuffix, removeProperSuffixIgnoreCase, removeSuffix, removeSuffix, removeSuffixIgnoreCase, replace, sequenceOf, sequenceOf, sequenceOf, split, split, split, split, split, split, split, split, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWithIgnoreCase, subSequence, subSequence, subSequence, toLowerCase, toLowerCase, toMapped, toUpperCase, toUpperCase, toVisibleWhitespaceString, trim, trim, trimEnd, trimEnd, trimEnd, trimEnd, trimEOL, trimLeadBlankLines, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEOL, trimmedStart, trimmedStart, trimmedStart, trimmedStart, trimStart, trimStart, trimStart, trimStart, trimTailBlankLinescharAt, chars, codePoints, length, toStringcompareTostatic 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
Object getBase()
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.index - index for which to get the offset in original sourceRange getIndexRange(int startOffset, int endOffset)
getBaseSequence() with startOffset and endOffsetstartOffset - start offset into base sequenceendOffset - end offset into base sequenceRange getSourceRange()
getBaseSequence() and getBase() original text source.BasedSequence baseSubSequence(int start, int end)
start - offset from 0 of original sequenceend - offset from 0 of original sequenceBasedSequence baseSubSequence(int start)
start - offset from 0 of original sequencechar safeCharAt(int index)
index - index in stringchar safeBaseCharAt(int index)
Allows peeking into preceding/following characters to the ones contained in this sequence
index - index in stringBasedSequence getEmptyPrefix()
BasedSequence getEmptySuffix()
String unescape()
String unescapeNoEntities()
BasedSequence unescape(ReplacedTextMapper textMapper)
textMapper - replaced text mapper which will be uses to map unescaped index to original source indexBasedSequence normalizeEOL(ReplacedTextMapper textMapper)
textMapper - replaced text mapper which will be uses to map unescaped index to original source indexBasedSequence normalizeEndWithEOL(ReplacedTextMapper textMapper)
textMapper - replaced text mapper which will be uses to map unescaped index to original source indexboolean isContinuedBy(BasedSequence other)
other - sequence to testboolean isContinuationOf(BasedSequence other)
other - sequence to testBasedSequence spliceAtEnd(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(BasedSequence other)
other - based sequence from the same baseboolean containsSomeOf(BasedSequence other)
other - based sequence from the same baseBasedSequence prefixOf(BasedSequence other)
other - based sequence from the same baseBasedSequence suffixOf(BasedSequence other)
other - based sequence from the same baseBasedSequence intersect(BasedSequence other)
other - based sequence from the same parentBasedSequence extendByAny(CharSequence charSet, int maxCount)
charSet - set of characters to includemaxCount - maximum extra characters to includedefault BasedSequence extendByAny(CharSequence charSet)
default BasedSequence extendByOneOfAny(CharSequence charSet)
BasedSequence extendToAny(CharSequence charSet, int maxCount)
charSet - set of characters to includemaxCount - maximum extra characters to includedefault BasedSequence extendToAny(CharSequence charSet)
BasedSequence prefixWithIndent(int maxColumns)
maxColumns - maximum columns to includedefault BasedSequence prefixWithIndent()
Copyright © 2019. All rights reserved.