public abstract class BasedSequenceImpl extends RichCharSequenceBase<BasedSequence> implements BasedSequence
BasedSequence.EmptyBasedSequenceEMPTY, EMPTY_ARRAY, EMPTY_LIST, EMPTY_SEGMENTS, EOL, NULL, SPACEEOL_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| Constructor and Description |
|---|
BasedSequenceImpl() |
| Modifier and Type | Method and Description |
|---|---|
BasedSequence |
baseSubSequence(int start)
Get a portion of the original sequence that this sequence is based on
|
int |
compareTo(CharSequence other) |
boolean |
containsAllOf(BasedSequence other)
start/end offset based containment, not textual
|
boolean |
containsSomeOf(BasedSequence other)
start/end offset based containment, not textual
|
BasedSequence[] |
emptyArray() |
boolean |
equals(Object other) |
boolean |
equals(Object other,
boolean ignoreCase)
Test the sequence for a match to another CharSequence
|
boolean |
equalsIgnoreCase(CharSequence other)
Test the sequence for a match to another CharSequence, ignoring case differences
|
static BasedSequence |
firstNonNull(BasedSequence... sequences) |
Range |
getIndexRange(int startOffset,
int endOffset)
Get the range of indices that map into
BasedSequence.getBaseSequence() with startOffset and endOffset |
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 |
nullSequence() |
static BasedSequence |
of(CharSequence charSequence) |
static BasedSequence |
of(CharSequence charSequence,
int start) |
static BasedSequence |
of(CharSequence charSequence,
int start,
int end) |
BasedSequence |
prefixOf(BasedSequence other)
Get the prefix part of this from other, start/end offset based containment, not textual
|
BasedSequence |
sequenceOf(CharSequence charSequence,
int startIndex,
int endIndex)
Factory function
|
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
|
BasedSequence |
toMapped(CharMapper mapper) |
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, columnsToNextTabStop, 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, endCharAt, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endSequence, endSequence, endsWith, endsWith, endsWithIgnoreCase, eolLength, eolLength, expandTo, firstChar, firstNonNull, 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, padEnd, padEnd, padStart, padStart, removePrefix, removePrefix, removePrefixIgnoreCase, removeProperPrefix, removeProperPrefix, removeProperPrefixIgnoreCase, removeProperSuffix, removeProperSuffix, removeProperSuffixIgnoreCase, removeSuffix, removeSuffix, removeSuffixIgnoreCase, replace, sequenceOf, sequenceOf, split, split, split, split, split, split, split, split, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWithIgnoreCase, subSequence, subSequence, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, toVisibleWhitespaceString, trim, trim, trimEnd, trimEnd, trimEnd, trimEnd, trimEOL, trimLeadBlankLines, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEnd, trimmedEOL, trimmedStart, trimmedStart, trimmedStart, trimmedStart, trimStart, trimStart, trimStart, trimStart, trimTailBlankLines, truncateToclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbaseSubSequence, getBase, getBaseSequence, getEndOffset, getIndexOffset, getSourceRange, getStartOffsetappend, 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, endCharAt, endOfDelimitedBy, endOfDelimitedByAny, endOfDelimitedByAnyNot, endOfLine, endOfLineAnyEOL, endSequence, endSequence, endsWith, endsWith, endsWithIgnoreCase, eolLength, eolLength, 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, padEnd, padEnd, padStart, padStart, removePrefix, removePrefix, removePrefixIgnoreCase, removeProperPrefix, removeProperPrefix, removeProperPrefixIgnoreCase, removeProperSuffix, removeProperSuffix, removeProperSuffixIgnoreCase, removeSuffix, removeSuffix, removeSuffixIgnoreCase, replace, sequenceOf, sequenceOf, split, split, split, split, split, split, split, split, startOfDelimitedBy, startOfDelimitedByAny, startOfDelimitedByAnyNot, startOfLine, startOfLineAnyEOL, startsWith, startsWith, startsWithIgnoreCase, subSequence, subSequence, subSequence, toLowerCase, toLowerCase, 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, toStringpublic static BasedSequence firstNonNull(BasedSequence... sequences)
public BasedSequence[] emptyArray()
emptyArray in interface RichCharSequence<BasedSequence>public BasedSequence nullSequence()
nullSequence in interface RichCharSequence<BasedSequence>public BasedSequence sequenceOf(CharSequence charSequence, int startIndex, int endIndex)
RichCharSequencesequenceOf in interface RichCharSequence<BasedSequence>charSequence - char sequence from which to construct a rich char sequencestartIndex - start index of the sequence to useendIndex - end index of the sequence to usepublic Range getIndexRange(int startOffset, int endOffset)
BasedSequenceBasedSequence.getBaseSequence() with startOffset and endOffsetgetIndexRange in interface BasedSequencestartOffset - start offset into base sequenceendOffset - end offset into base sequencepublic final BasedSequence toMapped(CharMapper mapper)
toMapped in interface RichCharSequence<BasedSequence>toMapped in class RichCharSequenceBase<BasedSequence>public BasedSequence baseSubSequence(int start)
BasedSequencebaseSubSequence in interface BasedSequencestart - offset from 0 of original sequencepublic String unescape()
BasedSequenceunescape in interface BasedSequencepublic String unescapeNoEntities()
BasedSequenceunescapeNoEntities in interface BasedSequencepublic BasedSequence unescape(ReplacedTextMapper textMapper)
BasedSequenceunescape in interface BasedSequencetextMapper - replaced text mapper which will be uses to map unescaped index to original source indexpublic BasedSequence normalizeEOL(ReplacedTextMapper textMapper)
BasedSequencenormalizeEOL in interface BasedSequencetextMapper - replaced text mapper which will be uses to map unescaped index to original source indexpublic BasedSequence normalizeEndWithEOL(ReplacedTextMapper textMapper)
BasedSequencenormalizeEndWithEOL in interface BasedSequencetextMapper - replaced text mapper which will be uses to map unescaped index to original source indexpublic boolean isContinuedBy(BasedSequence other)
BasedSequenceisContinuedBy in interface BasedSequenceother - sequence to testpublic boolean isContinuationOf(BasedSequence other)
BasedSequenceisContinuationOf in interface BasedSequenceother - sequence to testpublic BasedSequence spliceAtEnd(BasedSequence other)
BasedSequencespliceAtEnd in interface BasedSequenceother - sequence to append to end of this oneassertion will fail if the other sequence is not a continuation of this one
public boolean containsAllOf(BasedSequence other)
BasedSequencecontainsAllOf in interface BasedSequenceother - based sequence from the same basepublic boolean containsSomeOf(BasedSequence other)
BasedSequencecontainsSomeOf in interface BasedSequenceother - based sequence from the same basepublic BasedSequence intersect(BasedSequence other)
BasedSequenceintersect in interface BasedSequenceother - based sequence from the same parentpublic BasedSequence prefixOf(BasedSequence other)
BasedSequenceprefixOf in interface BasedSequenceother - based sequence from the same basepublic BasedSequence suffixOf(BasedSequence other)
BasedSequencesuffixOf in interface BasedSequenceother - based sequence from the same basepublic boolean equals(Object other)
equals in class RichCharSequenceBase<BasedSequence>public boolean equalsIgnoreCase(CharSequence other)
RichCharSequenceequalsIgnoreCase in interface RichCharSequence<BasedSequence>equalsIgnoreCase in class RichCharSequenceBase<BasedSequence>other - characters to match againstpublic boolean equals(Object other, boolean ignoreCase)
RichCharSequenceequals in interface RichCharSequence<BasedSequence>equals in class RichCharSequenceBase<BasedSequence>other - characters to match againstignoreCase - case ignored when truepublic int compareTo(CharSequence other)
compareTo in interface Comparable<CharSequence>compareTo in class RichCharSequenceBase<BasedSequence>public static BasedSequence of(CharSequence charSequence)
public static BasedSequence of(CharSequence charSequence, int start)
public static BasedSequence of(CharSequence charSequence, int start, int end)
Copyright © 2019. All rights reserved.