public abstract class BasedSequenceImpl extends Object implements BasedSequence
BasedSequence.EmptyBasedSequenceEMPTY_ARRAY, EMPTY_LIST, EMPTY_SEGMENTS, EOL, EOL_CHAR, EOL_CHAR1, EOL_CHAR2, EOL_CHARS, NULL, SPACE, 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 |
append(CharSequence... others) |
BasedSequence |
appendTo(StringBuilder out) |
BasedSequence |
appendTo(StringBuilder out,
int start) |
BasedSequence |
appendTo(StringBuilder out,
int start,
int end) |
BasedSequence |
baseSubSequence(int start)
Get a portion of the original sequence that this sequence is based on
|
static int |
columnsToNextTabStop(int column) |
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
|
int |
countChars(char c) |
int |
countChars(char c,
int fromIndex) |
int |
countChars(char c,
int fromIndex,
int endIndex) |
int |
countChars(CharSequence chars) |
int |
countChars(CharSequence chars,
int fromIndex) |
int |
countChars(CharSequence chars,
int fromIndex,
int endIndex) |
int |
countCharsReversed(char c) |
int |
countCharsReversed(char c,
int fromIndex) |
int |
countCharsReversed(char c,
int startIndex,
int fromIndex) |
int |
countCharsReversed(CharSequence chars) |
int |
countCharsReversed(CharSequence chars,
int fromIndex) |
int |
countCharsReversed(CharSequence chars,
int startIndex,
int fromIndex) |
int |
countLeading(char c) |
int |
countLeading(char c,
int fromIndex) |
int |
countLeading(char c,
int fromIndex,
int endIndex) |
int |
countLeading(CharSequence chars)
Count leading/trailing characters of this sequence
|
int |
countLeading(CharSequence chars,
int fromIndex) |
int |
countLeading(CharSequence chars,
int fromIndex,
int endIndex) |
int |
countLeadingColumns(int startColumn,
CharSequence chars) |
int |
countLeadingNot(char c) |
int |
countLeadingNot(char c,
int fromIndex) |
int |
countLeadingNot(char c,
int fromIndex,
int endIndex) |
int |
countLeadingNot(CharSequence chars) |
int |
countLeadingNot(CharSequence chars,
int fromIndex) |
int |
countLeadingNot(CharSequence chars,
int fromIndex,
int endIndex) |
int |
countNotChars(char c) |
int |
countNotChars(char c,
int fromIndex) |
int |
countNotChars(char c,
int fromIndex,
int endIndex) |
int |
countNotChars(CharSequence chars) |
int |
countNotChars(CharSequence chars,
int fromIndex) |
int |
countNotChars(CharSequence chars,
int fromIndex,
int endIndex) |
int |
countNotCharsReversed(char c) |
int |
countNotCharsReversed(char c,
int fromIndex) |
int |
countNotCharsReversed(char c,
int startIndex,
int fromIndex) |
int |
countNotCharsReversed(CharSequence chars) |
int |
countNotCharsReversed(CharSequence chars,
int fromIndex) |
int |
countNotCharsReversed(CharSequence chars,
int startIndex,
int fromIndex) |
int |
countTrailing(char c) |
int |
countTrailing(char c,
int fromIndex) |
int |
countTrailing(char c,
int startIndex,
int fromIndex) |
int |
countTrailing(CharSequence chars) |
int |
countTrailing(CharSequence chars,
int fromIndex) |
int |
countTrailing(CharSequence chars,
int startIndex,
int fromIndex) |
int |
countTrailingNot(char c) |
int |
countTrailingNot(char c,
int fromIndex) |
int |
countTrailingNot(char c,
int startIndex,
int fromIndex) |
int |
countTrailingNot(CharSequence chars) |
int |
countTrailingNot(CharSequence chars,
int fromIndex) |
int |
countTrailingNot(CharSequence chars,
int startIndex,
int fromIndex) |
char |
endCharAt(int index)
Convenience method to get characters offset from end of sequence.
|
int |
endOfDelimitedBy(CharSequence s,
int index)
Find start/end region in this sequence delimited by any characters in argument or the CharSequence
|
int |
endOfDelimitedByAny(CharSequence s,
int index) |
int |
endOfDelimitedByAnyNot(CharSequence s,
int index) |
int |
endOfLine(int index)
Get the offset of the end of line at given index, end of line delimited by \n or any of \n \r \r\n for Any methods.
|
int |
endOfLineAnyEOL(int index) |
BasedSequence |
endSequence(int start)
Convenience method to get characters offset from end of sequence.
|
BasedSequence |
endSequence(int start,
int end)
Convenience method to get characters offset from end of sequence.
|
boolean |
endsWith(CharSequence suffix)
test if this sequence ends with given characters
|
boolean |
endsWith(CharSequence suffix,
boolean ignoreCase)
test if this sequence ends with given characters
|
boolean |
endsWithIgnoreCase(CharSequence suffix)
test if this sequence ends with given characters, ignoring case differences
|
int |
eolLength()
Get the length of EOL character at the end of this sequence, if present.
|
int |
eolLength(int eolStart)
Get the length of EOL character at the given index of this sequence, if present.
|
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 int[] |
expandTo(int[] indices,
int length,
int step) |
char |
firstChar() |
static BasedSequence |
firstNonNull(BasedSequence... sequences) |
int |
getColumnAtIndex(int index) |
Range |
getIndexRange(int startOffset,
int endOffset)
Get the range of indices that map into
BasedSequence.getBaseSequence() with startOffset and endOffset |
Pair<Integer,Integer> |
getLineColumnAtIndex(int index)
Get the line and column information from index into sequence
|
BasedSequence |
ifNull(BasedSequence other)
If this sequence is the BasedSequence.NULL instance then returns other,
otherwise returns this sequence.
|
BasedSequence |
ifNullEmptyAfter(BasedSequence other)
If this sequence is the BasedSequence.NULL instance then returns an empty subSequence from the end of other,
otherwise returns this sequence.
|
BasedSequence |
ifNullEmptyBefore(BasedSequence other)
If this sequence is the BasedSequence.NULL instance then returns an empty subSequence from the start of other,
otherwise returns this sequence.
|
int |
indexOf(char c) |
int |
indexOf(char c,
int fromIndex) |
int |
indexOf(char c,
int fromIndex,
int endIndex) |
int |
indexOf(CharSequence s)
All index methods return the position or -1 if not found of the given character, characters or string.
|
int |
indexOf(CharSequence s,
int fromIndex) |
int |
indexOf(CharSequence s,
int fromIndex,
int endIndex) |
int[] |
indexOfAll(CharSequence s)
Get indices of all occurrences of a sequence
|
int |
indexOfAny(char c1,
char c2) |
int |
indexOfAny(char c1,
char c2,
char c3) |
int |
indexOfAny(char c1,
char c2,
char c3,
int fromIndex) |
int |
indexOfAny(char c1,
char c2,
char c3,
int fromIndex,
int endIndex) |
int |
indexOfAny(char c1,
char c2,
int fromIndex) |
int |
indexOfAny(char c1,
char c2,
int fromIndex,
int endIndex) |
int |
indexOfAny(CharSequence s) |
int |
indexOfAny(CharSequence s,
int index) |
int |
indexOfAny(CharSequence s,
int fromIndex,
int endIndex) |
int |
indexOfAnyNot(char c1,
char c2) |
int |
indexOfAnyNot(char c1,
char c2,
char c3) |
int |
indexOfAnyNot(char c1,
char c2,
char c3,
int fromIndex) |
int |
indexOfAnyNot(char c1,
char c2,
char c3,
int fromIndex,
int endIndex) |
int |
indexOfAnyNot(char c1,
char c2,
int fromIndex) |
int |
indexOfAnyNot(char c1,
char c2,
int fromIndex,
int endIndex) |
int |
indexOfAnyNot(CharSequence s) |
int |
indexOfAnyNot(CharSequence s,
int fromIndex) |
int |
indexOfAnyNot(CharSequence s,
int fromIndex,
int endIndex) |
int |
indexOfNot(char c) |
int |
indexOfNot(char c,
int fromIndex) |
int |
indexOfNot(char c,
int fromIndex,
int endIndex) |
BasedSequence |
intersect(BasedSequence other)
start/end offset based intersection, not textual
|
boolean |
isBlank() |
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
|
boolean |
isEmpty() |
boolean |
isNotNull() |
boolean |
isNull() |
char |
lastChar() |
int |
lastIndexOf(char c) |
int |
lastIndexOf(char c,
int fromIndex) |
int |
lastIndexOf(char c,
int startIndex,
int fromIndex) |
int |
lastIndexOf(CharSequence s) |
int |
lastIndexOf(CharSequence s,
int fromIndex) |
int |
lastIndexOf(CharSequence s,
int startIndex,
int fromIndex) |
int |
lastIndexOfAny(char c1,
char c2) |
int |
lastIndexOfAny(char c1,
char c2,
char c3) |
int |
lastIndexOfAny(char c1,
char c2,
char c3,
int fromIndex) |
int |
lastIndexOfAny(char c1,
char c2,
char c3,
int startIndex,
int fromIndex) |
int |
lastIndexOfAny(char c1,
char c2,
int fromIndex) |
int |
lastIndexOfAny(char c1,
char c2,
int startIndex,
int fromIndex) |
int |
lastIndexOfAny(CharSequence s) |
int |
lastIndexOfAny(CharSequence s,
int fromIndex) |
int |
lastIndexOfAny(CharSequence s,
int startIndex,
int fromIndex) |
int |
lastIndexOfAnyNot(char c1,
char c2) |
int |
lastIndexOfAnyNot(char c1,
char c2,
char c3) |
int |
lastIndexOfAnyNot(char c1,
char c2,
char c3,
int fromIndex) |
int |
lastIndexOfAnyNot(char c1,
char c2,
char c3,
int startIndex,
int fromIndex) |
int |
lastIndexOfAnyNot(char c1,
char c2,
int fromIndex) |
int |
lastIndexOfAnyNot(char c1,
char c2,
int startIndex,
int fromIndex) |
int |
lastIndexOfAnyNot(CharSequence s) |
int |
lastIndexOfAnyNot(CharSequence s,
int fromIndex) |
int |
lastIndexOfAnyNot(CharSequence s,
int startIndex,
int fromIndex) |
int |
lastIndexOfNot(char c) |
int |
lastIndexOfNot(char c,
int fromIndex) |
int |
lastIndexOfNot(char c,
int startIndex,
int fromIndex) |
BasedSequence |
lineAt(int index)
Get the line characters at given index, line delimited by \n
|
BasedSequence |
lineAtAnyEOL(int index)
Get the line characters at given index, line delimited by \n, \r or \r\n
|
boolean |
matchChars(CharSequence chars)
Test the sequence portion for a match to another CharSequence
|
boolean |
matchChars(CharSequence chars,
boolean ignoreCase)
Test the sequence portion for a match to another CharSequence
|
boolean |
matchChars(CharSequence chars,
int startIndex)
Test the sequence portion for a match to another CharSequence
|
boolean |
matchChars(CharSequence chars,
int startIndex,
boolean ignoreCase)
Test the sequence portion for a match to another CharSequence
|
boolean |
matchCharsIgnoreCase(CharSequence chars)
Test the sequence portion for a match to another CharSequence, ignoring case differences
|
boolean |
matchCharsIgnoreCase(CharSequence chars,
int startIndex)
Test the sequence portion for a match to another CharSequence, ignoring case differences
|
boolean |
matchCharsReversed(CharSequence chars,
int endIndex)
Test the sequence portion for a match to another CharSequence, reverse order
|
boolean |
matchCharsReversed(CharSequence chars,
int endIndex,
boolean ignoreCase)
Test the sequence portion for a match to another CharSequence, reverse order
|
boolean |
matchCharsReversedIgnoreCase(CharSequence chars,
int endIndex)
Test the sequence portion for a match to another CharSequence, reverse order, ignoring case differences
|
boolean |
matches(CharSequence chars)
Test the sequence for a match to another CharSequence
|
boolean |
matches(CharSequence chars,
boolean ignoreCase)
Test the sequence for a match to another CharSequence
|
boolean |
matchesIgnoreCase(CharSequence chars)
Test the sequence for a match to another CharSequence, ignoring case differences
|
char |
midCharAt(int index)
Convenience method to get characters offset from start or end of sequence.
|
BasedSequence |
midSequence(int start)
Convenience method to get characters offset from start or end of sequence.
|
BasedSequence |
midSequence(int start,
int end)
Convenience method to get characters offset from start or end of sequence.
|
String |
normalizeEndWithEOL()
replace any \r\n and \r by \n, append terminating EOL if one is not present
|
BasedSequence |
normalizeEndWithEOL(ReplacedTextMapper textMapper)
replace any \r\n and \r by \n, append terminating EOL if one is not present
|
String |
normalizeEOL()
replace any \r\n and \r by \n
|
BasedSequence |
normalizeEOL(ReplacedTextMapper textMapper)
replace any \r\n and \r by \n
|
BasedSequence |
nullIf(boolean condition)
If condition is true return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIf(CharSequence... matches)
If this sequence matches one of given sequences return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfBlank()
If this sequence is blank return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfEmpty()
If this sequence is empty return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfEndsWith(CharSequence... matches)
If this sequence ends with one of given sequences return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfEndsWithNot(CharSequence... matches)
If this sequence does not end with one of given sequences return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfNot(CharSequence... matches)
If this sequence does not match one of given sequences return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfStartsWith(CharSequence... matches)
If this sequence starts with one of given sequences return BasedSequence.NULL otherwise returns this sequence.
|
BasedSequence |
nullIfStartsWithNot(CharSequence... matches)
If this sequence does not start with one of given sequences return BasedSequence.NULL otherwise returns this sequence.
|
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 |
removePrefix(CharSequence prefix)
Remove prefix if present
|
BasedSequence |
removePrefix(CharSequence prefix,
boolean ignoreCase)
Remove prefix if present
|
BasedSequence |
removePrefixIgnoreCase(CharSequence prefix)
Remove prefix if present, ignoring case differences
|
BasedSequence |
removeProperPrefix(CharSequence prefix)
Remove prefix if present but only if this sequence is longer than the suffix
|
BasedSequence |
removeProperPrefix(CharSequence prefix,
boolean ignoreCase)
Remove prefix if present but only if this sequence is longer than the suffix
|
BasedSequence |
removeProperPrefixIgnoreCase(CharSequence prefix)
Remove prefix if present but only if this sequence is longer than the suffix, ignoring case differences
|
BasedSequence |
removeProperSuffix(CharSequence suffix)
Remove suffix if present but only if this sequence is longer than the suffix
|
BasedSequence |
removeProperSuffix(CharSequence suffix,
boolean ignoreCase)
Remove suffix if present but only if this sequence is longer than the suffix
|
BasedSequence |
removeProperSuffixIgnoreCase(CharSequence suffix)
Remove suffix if present but only if this sequence is longer than the suffix, ignoring case differences
|
BasedSequence |
removeSuffix(CharSequence suffix)
Remove suffix if present
|
BasedSequence |
removeSuffix(CharSequence suffix,
boolean ignoreCase)
Remove suffix if present
|
BasedSequence |
removeSuffixIgnoreCase(CharSequence suffix)
Remove suffix if present, ignoring case differences
|
BasedSequence |
replace(CharSequence find,
CharSequence replace)
Replace all occurrences of one sequence with another
|
BasedSequence |
spliceAtEnd(BasedSequence other)
Splice the given sequence to the end of this one and return a BasedSequence of the result.
|
BasedSequence[] |
split(char delimiter) |
BasedSequence[] |
split(char delimiter,
int limit) |
BasedSequence[] |
split(char delimiter,
int limit,
int flags) |
BasedSequence[] |
split(char delimiter,
int limit,
int flags,
String trimChars)
Split helpers based on delimiter character sets contained in CharSequence
|
BasedSequence[] |
split(CharSequence delimiter) |
BasedSequence[] |
split(CharSequence delimiter,
int limit) |
BasedSequence[] |
split(CharSequence delimiter,
int limit,
int flags) |
BasedSequence[] |
split(CharSequence delimiter,
int limit,
int flags,
String trimChars) |
int |
startOfDelimitedBy(CharSequence s,
int index) |
int |
startOfDelimitedByAny(CharSequence s,
int index) |
int |
startOfDelimitedByAnyNot(CharSequence s,
int index) |
int |
startOfLine(int index) |
int |
startOfLineAnyEOL(int index) |
boolean |
startsWith(CharSequence prefix)
test if this sequence starts with given characters
|
boolean |
startsWith(CharSequence prefix,
boolean ignoreCase)
test if this sequence starts with given characters
|
boolean |
startsWithIgnoreCase(CharSequence prefix)
test if this sequence starts with given characters, ignoring case differences
|
BasedSequence |
subSequence(int start)
Get a portion of this sequence starting from a given offset to end of the sequence
|
BasedSequence |
subSequence(Range range)
Get a portion of this sequence
|
BasedSequence |
suffixOf(BasedSequence other)
Get the suffix part of this from other, start/end offset based containment, not textual
|
MappedSequence |
toLowerCase()
Map characters of this sequence to: Uppercase, Lowercase or use custom mapping
|
MappedSequence |
toLowerCase(Locale locale) |
MappedSequence |
toMapped(CharMapper mapper) |
String |
toString() |
MappedSequence |
toUpperCase() |
MappedSequence |
toUpperCase(Locale locale) |
String |
toVisibleWhitespaceString() |
BasedSequence |
trim() |
BasedSequence |
trim(CharSequence chars) |
BasedSequence |
trimEnd() |
BasedSequence |
trimEnd(CharSequence chars) |
BasedSequence |
trimEOL() |
BasedSequence |
trimLeadBlankLines() |
BasedSequence |
trimmedEnd() |
BasedSequence |
trimmedEnd(CharSequence chars) |
BasedSequence |
trimmedEOL() |
BasedSequence |
trimmedStart() |
BasedSequence |
trimmedStart(CharSequence chars)
Get the characters Trimmed, Trimmed from start/end of this sequence, characters to trim are passed in the sequence argument
|
BasedSequence |
trimStart() |
BasedSequence |
trimStart(CharSequence chars)
Trim, Trim start/end of this sequence, characters to trim are passed in the sequence argument
|
BasedSequence |
trimTailBlankLines()
Trim leading trailing blank lines in this sequence
|
static int[] |
truncateTo(int[] indices,
int length) |
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
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbaseSubSequence, getBase, getBaseSequence, getEndOffset, getIndexOffset, getSourceRange, getStartOffset, subSequencecharAt, chars, codePoints, lengthpublic static BasedSequence firstNonNull(BasedSequence... sequences)
public 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 BasedSequence endSequence(int start, int end)
BasedSequenceendSequence in interface BasedSequencestart - offset from end of sequence [ 0..length() )end - offset from end of sequence [ 0..length() )public BasedSequence endSequence(int start)
BasedSequenceendSequence in interface BasedSequencestart - offset from end of sequence [ 0..length() )public char endCharAt(int index)
BasedSequenceendCharAt in interface BasedSequenceindex - offset from end of sequencepublic BasedSequence midSequence(int start, int end)
BasedSequenceno exceptions are thrown, instead a \0 is returned for an invalid index positions
midSequence in interface BasedSequencestart - offset into this sequenceend - offset into this sequencepublic BasedSequence midSequence(int start)
BasedSequenceno exceptions are thrown, instead a \0 is returned for an invalid index positions
midSequence in interface BasedSequencestart - offset into this sequencepublic char midCharAt(int index)
BasedSequencemidCharAt in interface BasedSequenceindex - of character to getpublic char lastChar()
lastChar in interface BasedSequencepublic char firstChar()
firstChar in interface BasedSequencepublic int indexOf(CharSequence s)
BasedSequenceThe basic methods have overloads for 1, 2, or 3 characters and CharSequence parameters. If fromIndex is not given then for forward searching methods 0 is taken as the value, for reverse searching methods length() is taken as the value
For forward searching methods fromIndex is the minimum start position for search and endIndex is the maximum end position, if not given the length() of string is assumed.
For reverse searching methods fromIndex is the maximum start position for search and startIndex is the minimum end position, if not given then 0 is assumed.
Variations of arguments are for convenience and speed when 1, 2 or 3 characters are needed to be tested. Methods that take a character set in the form of CharSequence will route their call to character based methods if the CharSequence is only 1, 2 or 3 characters long.
indexOf(CharSequence): returns the index of the next occurrence of given text in this sequence
indexOfAny(CharSequence): returns the index of the next occurrence of any of the characters in this sequence indexOfAny(char): returns the index of the next occurrence of any of the characters in this sequence indexOfAny(char,char): returns the index of the next occurrence of any of the characters in this sequence indexOfAny(char,char,char): returns the index of the next occurrence of any of the characters in this sequence
indexOfAnyNot(CharSequence): returns the index of the next occurrence of any of the characters not in this sequence indexOfAnyNot(char): returns the index of the next occurrence of any of the characters not in this sequence indexOfAnyNot(char,char): returns the index of the next occurrence of any of the characters not in this sequence indexOfAnyNot(char,char,char): returns the index of the next occurrence of any of the characters not in this sequence
lastIndexOf(CharSequence): returns the index of the previous occurrence of given text in this sequence, reversed search
lastIndexOfAny(CharSequence): returns the index of the previous occurrence of any of the characters in this sequence, reversed search lastIndexOfAny(char): returns the index of the previous occurrence of any of the characters in this sequence, reversed search lastIndexOfAny(char,char): returns the index of the previous occurrence of any of the characters in this sequence, reversed search lastIndexOfAny(char,char,char): returns the index of the previous occurrence of any of the characters in this sequence, reversed search
lastIndexOfAnyNot(CharSequence): returns the index of the previous occurrence of any of the characters not in this sequence, reversed search lastIndexOfAnyNot(Char): returns the index of the previous occurrence of any of the characters not in this sequence, reversed search lastIndexOfAnyNot(char,char): returns the index of the previous occurrence of any of the characters not in this sequence, reversed search lastIndexOfAnyNot(char,char,char): returns the index of the previous occurrence of any of the characters not in this sequence, reversed search
indexOf in interface BasedSequences - character sequence whose occurrence to findpublic int indexOf(CharSequence s, int fromIndex)
indexOf in interface BasedSequencepublic int indexOf(CharSequence s, int fromIndex, int endIndex)
indexOf in interface BasedSequencepublic int indexOf(char c)
indexOf in interface BasedSequencepublic int indexOfAny(char c1,
char c2)
indexOfAny in interface BasedSequencepublic int indexOfAny(char c1,
char c2,
char c3)
indexOfAny in interface BasedSequencepublic int indexOfAny(CharSequence s)
indexOfAny in interface BasedSequencepublic int indexOf(char c,
int fromIndex)
indexOf in interface BasedSequencepublic int indexOfAny(char c1,
char c2,
int fromIndex)
indexOfAny in interface BasedSequencepublic int indexOfAny(char c1,
char c2,
char c3,
int fromIndex)
indexOfAny in interface BasedSequencepublic int indexOfAny(CharSequence s, int index)
indexOfAny in interface BasedSequencepublic int indexOf(char c,
int fromIndex,
int endIndex)
indexOf in interface BasedSequencepublic int indexOfAny(char c1,
char c2,
int fromIndex,
int endIndex)
indexOfAny in interface BasedSequencepublic int indexOfAny(char c1,
char c2,
char c3,
int fromIndex,
int endIndex)
indexOfAny in interface BasedSequencepublic int indexOfAny(CharSequence s, int fromIndex, int endIndex)
indexOfAny in interface BasedSequencepublic int indexOfNot(char c)
indexOfNot in interface BasedSequencepublic int indexOfAnyNot(char c1,
char c2)
indexOfAnyNot in interface BasedSequencepublic int indexOfAnyNot(char c1,
char c2,
char c3)
indexOfAnyNot in interface BasedSequencepublic int indexOfAnyNot(CharSequence s)
indexOfAnyNot in interface BasedSequencepublic int indexOfNot(char c,
int fromIndex)
indexOfNot in interface BasedSequencepublic int indexOfAnyNot(char c1,
char c2,
int fromIndex)
indexOfAnyNot in interface BasedSequencepublic int indexOfAnyNot(char c1,
char c2,
char c3,
int fromIndex)
indexOfAnyNot in interface BasedSequencepublic int indexOfAnyNot(CharSequence s, int fromIndex)
indexOfAnyNot in interface BasedSequencepublic int indexOfNot(char c,
int fromIndex,
int endIndex)
indexOfNot in interface BasedSequencepublic int indexOfAnyNot(char c1,
char c2,
int fromIndex,
int endIndex)
indexOfAnyNot in interface BasedSequencepublic int indexOfAnyNot(char c1,
char c2,
char c3,
int fromIndex,
int endIndex)
indexOfAnyNot in interface BasedSequencepublic int indexOfAnyNot(CharSequence s, int fromIndex, int endIndex)
indexOfAnyNot in interface BasedSequencepublic int lastIndexOf(CharSequence s)
lastIndexOf in interface BasedSequencepublic int lastIndexOf(CharSequence s, int fromIndex)
lastIndexOf in interface BasedSequencepublic int lastIndexOf(CharSequence s, int startIndex, int fromIndex)
lastIndexOf in interface BasedSequencepublic int lastIndexOf(char c)
lastIndexOf in interface BasedSequencepublic int lastIndexOfAny(char c1,
char c2)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfAny(char c1,
char c2,
char c3)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfAny(CharSequence s)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOf(char c,
int fromIndex)
lastIndexOf in interface BasedSequencepublic int lastIndexOfAny(char c1,
char c2,
int fromIndex)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfAny(char c1,
char c2,
char c3,
int fromIndex)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfAny(CharSequence s, int fromIndex)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOf(char c,
int startIndex,
int fromIndex)
lastIndexOf in interface BasedSequencepublic int lastIndexOfAny(char c1,
char c2,
int startIndex,
int fromIndex)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfAny(char c1,
char c2,
char c3,
int startIndex,
int fromIndex)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfAny(CharSequence s, int startIndex, int fromIndex)
lastIndexOfAny in interface BasedSequencepublic int lastIndexOfNot(char c)
lastIndexOfNot in interface BasedSequencepublic int lastIndexOfAnyNot(char c1,
char c2)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfAnyNot(char c1,
char c2,
char c3)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfAnyNot(CharSequence s)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfNot(char c,
int fromIndex)
lastIndexOfNot in interface BasedSequencepublic int lastIndexOfAnyNot(char c1,
char c2,
int fromIndex)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfAnyNot(char c1,
char c2,
char c3,
int fromIndex)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfAnyNot(CharSequence s, int fromIndex)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfNot(char c,
int startIndex,
int fromIndex)
lastIndexOfNot in interface BasedSequencepublic int lastIndexOfAnyNot(char c1,
char c2,
int startIndex,
int fromIndex)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfAnyNot(char c1,
char c2,
char c3,
int startIndex,
int fromIndex)
lastIndexOfAnyNot in interface BasedSequencepublic int lastIndexOfAnyNot(CharSequence s, int startIndex, int fromIndex)
lastIndexOfAnyNot in interface BasedSequencepublic int startOfDelimitedBy(CharSequence s, int index)
startOfDelimitedBy in interface BasedSequencepublic int startOfDelimitedByAny(CharSequence s, int index)
startOfDelimitedByAny in interface BasedSequencepublic int startOfDelimitedByAnyNot(CharSequence s, int index)
startOfDelimitedByAnyNot in interface BasedSequencepublic int endOfDelimitedBy(CharSequence s, int index)
BasedSequenceFor Any and AnyNot methods uses the CharSequence argument as a character set of possible delimiting characters
endOfDelimitedBy in interface BasedSequences - character sequence delimiting the regionindex - from which to start looking for end of regionpublic int endOfDelimitedByAny(CharSequence s, int index)
endOfDelimitedByAny in interface BasedSequencepublic int endOfDelimitedByAnyNot(CharSequence s, int index)
endOfDelimitedByAnyNot in interface BasedSequencepublic int endOfLine(int index)
BasedSequenceendOfLine in interface BasedSequenceindex - index where to start searching for end of linepublic int endOfLineAnyEOL(int index)
endOfLineAnyEOL in interface BasedSequencepublic int startOfLine(int index)
startOfLine in interface BasedSequencepublic int startOfLineAnyEOL(int index)
startOfLineAnyEOL in interface BasedSequencepublic BasedSequence lineAt(int index)
BasedSequencelineAt in interface BasedSequenceindex - index at which to get the linepublic BasedSequence lineAtAnyEOL(int index)
BasedSequencelineAtAnyEOL in interface BasedSequenceindex - index at which to get the linepublic int countLeading(char c)
countLeading in interface BasedSequencepublic int countLeadingNot(char c)
countLeadingNot in interface BasedSequencepublic int countLeading(char c,
int fromIndex)
countLeading in interface BasedSequencepublic int countLeadingNot(char c,
int fromIndex)
countLeadingNot in interface BasedSequencepublic int countLeading(char c,
int fromIndex,
int endIndex)
countLeading in interface BasedSequencepublic int countLeadingNot(char c,
int fromIndex,
int endIndex)
countLeadingNot in interface BasedSequencepublic int countTrailing(char c)
countTrailing in interface BasedSequencepublic int countTrailingNot(char c)
countTrailingNot in interface BasedSequencepublic int countTrailing(char c,
int fromIndex)
countTrailing in interface BasedSequencepublic int countTrailingNot(char c,
int fromIndex)
countTrailingNot in interface BasedSequencepublic int countTrailing(char c,
int startIndex,
int fromIndex)
countTrailing in interface BasedSequencepublic int countTrailingNot(char c,
int startIndex,
int fromIndex)
countTrailingNot in interface BasedSequencepublic int countChars(char c)
countChars in interface BasedSequencepublic int countNotChars(char c)
countNotChars in interface BasedSequencepublic int countChars(char c,
int fromIndex)
countChars in interface BasedSequencepublic int countNotChars(char c,
int fromIndex)
countNotChars in interface BasedSequencepublic int countCharsReversed(char c)
countCharsReversed in interface BasedSequencepublic int countNotCharsReversed(char c)
countNotCharsReversed in interface BasedSequencepublic int countCharsReversed(char c,
int fromIndex)
countCharsReversed in interface BasedSequencepublic int countNotCharsReversed(char c,
int fromIndex)
countNotCharsReversed in interface BasedSequencepublic int countChars(char c,
int fromIndex,
int endIndex)
countChars in interface BasedSequencepublic int countCharsReversed(char c,
int startIndex,
int fromIndex)
countCharsReversed in interface BasedSequencepublic int countNotChars(char c,
int fromIndex,
int endIndex)
countNotChars in interface BasedSequencepublic int countNotCharsReversed(char c,
int startIndex,
int fromIndex)
countNotCharsReversed in interface BasedSequencepublic int countLeading(CharSequence chars)
BasedSequenceParameters can be: 1, 2 or 3 characters or CharSequence. For character arguments counts any contiguous leading/trailing characters in the sequence.
For CharSequence counts counts any contiguous leading/trailing characters in the sequence which are contained in the given char sequence.
All functions have overloads: with no fromIndex then 0 is taken for leading and length() for trailing methods with fromIndex then this is taken as the start for leading and end for trailing methods with fromIndex and endIndex, counting will start at fromIndex and stop at endIndex
countLeading(CharSequence): count contiguous leading characters from set in this sequence countLeading(char): count contiguous leading characters from set in this sequence countLeading(char,char): count contiguous leading characters from set in this sequence countLeading(char,char,char): count contiguous leading characters from set in this sequence
countLeadingNot(CharSequence): count contiguous leading characters not from set in this sequence countLeadingNot(char): count contiguous leading characters not from set in this sequence countLeadingNot(char,char): count contiguous leading characters not from set in this sequence countLeadingNot(char,char,char): count contiguous leading characters not from set in this sequence
countTrailing(CharSequence): count contiguous leading characters from set in this sequence countTrailing(char): count contiguous leading characters from set in this sequence countTrailing(char,char): count contiguous leading characters from set in this sequence countTrailing(char,char,char): count contiguous leading characters from set in this sequence
countTrailingNot(CharSequence): count contiguous leading characters not from set in this sequence countTrailingNot(char): count contiguous leading characters not from set in this sequence countTrailingNot(char,char): count contiguous leading characters not from set in this sequence countTrailingNot(char,char,char): count contiguous leading characters not from set in this sequence
countLeading in interface BasedSequencechars - set of contiguous characters which should be counted at start of sequencepublic int countLeadingNot(CharSequence chars)
countLeadingNot in interface BasedSequencepublic int countLeading(CharSequence chars, int fromIndex)
countLeading in interface BasedSequencepublic int countLeadingNot(CharSequence chars, int fromIndex)
countLeadingNot in interface BasedSequencepublic int countLeading(CharSequence chars, int fromIndex, int endIndex)
countLeading in interface BasedSequencepublic int countLeadingNot(CharSequence chars, int fromIndex, int endIndex)
countLeadingNot in interface BasedSequencepublic int countTrailing(CharSequence chars)
countTrailing in interface BasedSequencepublic int countTrailingNot(CharSequence chars)
countTrailingNot in interface BasedSequencepublic int countTrailing(CharSequence chars, int fromIndex)
countTrailing in interface BasedSequencepublic int countTrailingNot(CharSequence chars, int fromIndex)
countTrailingNot in interface BasedSequencepublic int countTrailing(CharSequence chars, int startIndex, int fromIndex)
countTrailing in interface BasedSequencepublic int countTrailingNot(CharSequence chars, int startIndex, int fromIndex)
countTrailingNot in interface BasedSequencepublic int countChars(CharSequence chars)
countChars in interface BasedSequencepublic int countNotChars(CharSequence chars)
countNotChars in interface BasedSequencepublic int countChars(CharSequence chars, int fromIndex)
countChars in interface BasedSequencepublic int countNotChars(CharSequence chars, int fromIndex)
countNotChars in interface BasedSequencepublic int countCharsReversed(CharSequence chars)
countCharsReversed in interface BasedSequencepublic int countNotCharsReversed(CharSequence chars)
countNotCharsReversed in interface BasedSequencepublic int countCharsReversed(CharSequence chars, int fromIndex)
countCharsReversed in interface BasedSequencepublic int countNotCharsReversed(CharSequence chars, int fromIndex)
countNotCharsReversed in interface BasedSequencepublic int countChars(CharSequence chars, int fromIndex, int endIndex)
countChars in interface BasedSequencepublic static int columnsToNextTabStop(int column)
public int countLeadingColumns(int startColumn,
CharSequence chars)
countLeadingColumns in interface BasedSequencepublic int countCharsReversed(CharSequence chars, int startIndex, int fromIndex)
countCharsReversed in interface BasedSequencepublic int countNotChars(CharSequence chars, int fromIndex, int endIndex)
countNotChars in interface BasedSequencepublic int countNotCharsReversed(CharSequence chars, int startIndex, int fromIndex)
countNotCharsReversed in interface BasedSequencepublic BasedSequence trimStart(CharSequence chars)
BasedSequencereturns trimmed sequence or if nothing matched the original sequence
If character set in the form of character sequence is not passed in the BasedSequence.WHITESPACE_CHARS are assumed.
trimStart in interface BasedSequencechars - set of characters to trim from start of linepublic BasedSequence trimmedStart(CharSequence chars)
BasedSequencereturns trimmed sequence or if nothing matched the original sequence
trimmedStart in interface BasedSequencechars - set of characters to trim from start of linepublic BasedSequence trimEnd(CharSequence chars)
trimEnd in interface BasedSequencepublic BasedSequence trimmedEnd(CharSequence chars)
trimmedEnd in interface BasedSequencepublic BasedSequence trim(CharSequence chars)
trim in interface BasedSequencepublic BasedSequence trimStart()
trimStart in interface BasedSequencepublic BasedSequence trimmedStart()
trimmedStart in interface BasedSequencepublic BasedSequence trimEnd()
trimEnd in interface BasedSequencepublic BasedSequence trimmedEnd()
trimmedEnd in interface BasedSequencepublic int eolLength()
BasedSequence\n - 1 \r - 1 \r\n - 2
eolLength in interface BasedSequencepublic int eolLength(int eolStart)
BasedSequence\n - 1 \r - 1 \r\n - 2
eolLength in interface BasedSequencepublic BasedSequence trimEOL()
trimEOL in interface BasedSequencepublic BasedSequence trimmedEOL()
trimmedEOL in interface BasedSequencepublic BasedSequence trim()
trim in interface BasedSequencepublic BasedSequence ifNull(BasedSequence other)
BasedSequenceifNull in interface BasedSequenceother - based sequence to return if this is BasedSequence.NULLpublic BasedSequence ifNullEmptyAfter(BasedSequence other)
BasedSequenceifNullEmptyAfter in interface BasedSequenceother - based sequence from which to take the empty sequencepublic BasedSequence ifNullEmptyBefore(BasedSequence other)
BasedSequenceifNullEmptyBefore in interface BasedSequenceother - based sequence from which to take the empty sequencepublic BasedSequence nullIfEmpty()
BasedSequencenullIfEmpty in interface BasedSequencepublic BasedSequence nullIfBlank()
BasedSequencenullIfBlank in interface BasedSequencepublic BasedSequence nullIf(boolean condition)
BasedSequencenullIf in interface BasedSequencecondition - when true return NULL else thispublic BasedSequence nullIf(CharSequence... matches)
BasedSequencenullIf in interface BasedSequencematches - match sequence listpublic BasedSequence nullIfNot(CharSequence... matches)
BasedSequencenullIfNot in interface BasedSequencematches - match sequence listpublic BasedSequence nullIfStartsWith(CharSequence... matches)
BasedSequencenullIfStartsWith in interface BasedSequencematches - match sequence listpublic BasedSequence nullIfStartsWithNot(CharSequence... matches)
BasedSequencenullIfStartsWithNot in interface BasedSequencematches - match sequence listpublic BasedSequence nullIfEndsWith(CharSequence... matches)
BasedSequencenullIfEndsWith in interface BasedSequencematches - match sequence listpublic BasedSequence nullIfEndsWithNot(CharSequence... matches)
BasedSequencenullIfEndsWithNot in interface BasedSequencematches - match sequence listpublic boolean isEmpty()
isEmpty in interface BasedSequencepublic boolean isBlank()
isBlank in interface BasedSequencepublic boolean isNull()
isNull in interface BasedSequencepublic boolean isNotNull()
isNotNull in interface BasedSequencepublic boolean endsWith(CharSequence suffix)
BasedSequenceendsWith in interface BasedSequencesuffix - characters to testpublic boolean startsWith(CharSequence prefix)
BasedSequencestartsWith in interface BasedSequenceprefix - characters to testpublic BasedSequence removeSuffix(CharSequence suffix)
BasedSequenceremoveSuffix in interface BasedSequencesuffix - characters to removepublic BasedSequence removePrefix(CharSequence prefix)
BasedSequenceremovePrefix in interface BasedSequenceprefix - characters to removepublic BasedSequence removeProperSuffix(CharSequence suffix)
BasedSequenceremoveProperSuffix in interface BasedSequencesuffix - characters to removepublic BasedSequence removeProperPrefix(CharSequence prefix)
BasedSequenceremoveProperPrefix in interface BasedSequenceprefix - characters to removepublic boolean endsWithIgnoreCase(CharSequence suffix)
BasedSequenceendsWithIgnoreCase in interface BasedSequencesuffix - characters to testpublic boolean startsWithIgnoreCase(CharSequence prefix)
BasedSequencestartsWithIgnoreCase in interface BasedSequenceprefix - characters to testpublic BasedSequence removeSuffixIgnoreCase(CharSequence suffix)
BasedSequenceremoveSuffixIgnoreCase in interface BasedSequencesuffix - characters to removepublic BasedSequence removePrefixIgnoreCase(CharSequence prefix)
BasedSequenceremovePrefixIgnoreCase in interface BasedSequenceprefix - characters to removepublic BasedSequence removeProperSuffixIgnoreCase(CharSequence suffix)
BasedSequenceremoveProperSuffixIgnoreCase in interface BasedSequencesuffix - characters to removepublic BasedSequence removeProperPrefixIgnoreCase(CharSequence prefix)
BasedSequenceremoveProperPrefixIgnoreCase in interface BasedSequenceprefix - characters to removepublic boolean endsWith(CharSequence suffix, boolean ignoreCase)
BasedSequenceendsWith in interface BasedSequencesuffix - characters to testignoreCase - case ignored when truepublic boolean startsWith(CharSequence prefix, boolean ignoreCase)
BasedSequencestartsWith in interface BasedSequenceprefix - characters to testignoreCase - case ignored when truepublic BasedSequence removeSuffix(CharSequence suffix, boolean ignoreCase)
BasedSequenceremoveSuffix in interface BasedSequencesuffix - characters to removeignoreCase - case ignored when truepublic BasedSequence removePrefix(CharSequence prefix, boolean ignoreCase)
BasedSequenceremovePrefix in interface BasedSequenceprefix - characters to removeignoreCase - case ignored when truepublic BasedSequence removeProperSuffix(CharSequence suffix, boolean ignoreCase)
BasedSequenceremoveProperSuffix in interface BasedSequencesuffix - characters to removeignoreCase - case ignored when truepublic BasedSequence removeProperPrefix(CharSequence prefix, boolean ignoreCase)
BasedSequenceremoveProperPrefix in interface BasedSequenceprefix - characters to removeignoreCase - case ignored when truepublic MappedSequence toLowerCase()
BasedSequencetoLowerCase in interface BasedSequencepublic MappedSequence toUpperCase()
toUpperCase in interface BasedSequencepublic MappedSequence toLowerCase(Locale locale)
toLowerCase in interface BasedSequencepublic MappedSequence toUpperCase(Locale locale)
toUpperCase in interface BasedSequencepublic final MappedSequence toMapped(CharMapper mapper)
toMapped in interface BasedSequencepublic boolean matches(CharSequence chars)
BasedSequencematches in interface BasedSequencechars - characters to match againstpublic boolean matchesIgnoreCase(CharSequence chars)
BasedSequencematchesIgnoreCase in interface BasedSequencechars - characters to match againstpublic boolean matches(CharSequence chars, boolean ignoreCase)
BasedSequencematches in interface BasedSequencechars - characters to match againstignoreCase - case ignored when truepublic boolean matchChars(CharSequence chars)
BasedSequencematchChars in interface BasedSequencechars - characters to match againstpublic boolean matchCharsIgnoreCase(CharSequence chars)
BasedSequencematchCharsIgnoreCase in interface BasedSequencechars - characters to match againstpublic boolean matchChars(CharSequence chars, boolean ignoreCase)
BasedSequencematchChars in interface BasedSequencechars - characters to match againstignoreCase - case ignored when truepublic boolean matchChars(CharSequence chars, int startIndex)
BasedSequencematchChars in interface BasedSequencechars - characters to match againststartIndex - index from which to start the matchpublic boolean matchCharsIgnoreCase(CharSequence chars, int startIndex)
BasedSequencematchCharsIgnoreCase in interface BasedSequencechars - characters to match againststartIndex - index from which to start the matchpublic boolean matchChars(CharSequence chars, int startIndex, boolean ignoreCase)
BasedSequencematchChars in interface BasedSequencechars - characters to match againststartIndex - index from which to start the matchignoreCase - case ignored when truepublic boolean matchCharsReversed(CharSequence chars, int endIndex)
BasedSequencematchCharsReversed in interface BasedSequencechars - characters to match againstendIndex - index from which to start the match and proceed to 0public boolean matchCharsReversedIgnoreCase(CharSequence chars, int endIndex)
BasedSequencematchCharsReversedIgnoreCase in interface BasedSequencechars - characters to match againstendIndex - index from which to start the match and proceed to 0public boolean matchCharsReversed(CharSequence chars, int endIndex, boolean ignoreCase)
BasedSequencematchCharsReversed in interface BasedSequencechars - characters to match againstendIndex - index from which to start the match and proceed to 0ignoreCase - case ignored when truepublic BasedSequence subSequence(Range range)
BasedSequencesubSequence in interface BasedSequencerange - range to get, coordinates offset form start of this sequencepublic BasedSequence subSequence(int start)
BasedSequencesubSequence in interface BasedSequencestart - offset from start of this sequencepublic BasedSequence baseSubSequence(int start)
BasedSequencebaseSubSequence in interface BasedSequencestart - offset from 0 of original sequencepublic BasedSequence trimTailBlankLines()
BasedSequencetrimTailBlankLines in interface BasedSequencepublic BasedSequence trimLeadBlankLines()
trimLeadBlankLines in interface BasedSequencepublic String toString()
toString in interface CharSequencetoString in class Objectpublic 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 String normalizeEOL()
BasedSequencenormalizeEOL in interface BasedSequencepublic BasedSequence normalizeEOL(ReplacedTextMapper textMapper)
BasedSequencenormalizeEOL in interface BasedSequencetextMapper - replaced text mapper which will be uses to map unescaped index to original source indexpublic String normalizeEndWithEOL()
BasedSequencenormalizeEndWithEOL in interface BasedSequencepublic BasedSequence normalizeEndWithEOL(ReplacedTextMapper textMapper)
BasedSequencenormalizeEndWithEOL in interface BasedSequencetextMapper - replaced text mapper which will be uses to map unescaped index to original source indexpublic String toVisibleWhitespaceString()
toVisibleWhitespaceString in interface BasedSequencepublic 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 BasedSequence[] split(char delimiter)
split in interface BasedSequencepublic BasedSequence[] split(char delimiter, int limit)
split in interface BasedSequencepublic BasedSequence[] split(char delimiter, int limit, int flags)
split in interface BasedSequencepublic BasedSequence[] split(CharSequence delimiter)
split in interface BasedSequencepublic BasedSequence[] split(CharSequence delimiter, int limit)
split in interface BasedSequencepublic BasedSequence[] split(CharSequence delimiter, int limit, int flags)
split in interface BasedSequencepublic BasedSequence[] split(char delimiter, int limit, int flags, String trimChars)
BasedSequencesplit in interface BasedSequencedelimiter - delimiter char or set of chars in CharSequence to split this sequence onlimit - max number of segments to splitflags - flags for desired options:
SPLIT_INCLUDE_DELIMS: include delimiters as part of split item
SPLIT_TRIM_PARTS: trim the segments
SPLIT_SKIP_EMPTY: skip empty segments (or empty after trimming if enabled)
SPLIT_INCLUDE_DELIM_PARTS: include delimiters as separate split item of its own
SPLIT_TRIM_SKIP_EMPTY: same as SPLIT_TRIM_PARTS | SPLIT_SKIP_EMPTYtrimChars - set of characters that should be used for trimming individual split resultspublic BasedSequence[] split(CharSequence delimiter, int limit, int flags, String trimChars)
split in interface BasedSequencepublic BasedSequence appendTo(StringBuilder out)
appendTo in interface BasedSequencepublic BasedSequence appendTo(StringBuilder out, int start)
appendTo in interface BasedSequencepublic BasedSequence appendTo(StringBuilder out, int start, int end)
appendTo in interface BasedSequencepublic static int[] expandTo(int[] indices,
int length,
int step)
public static int[] truncateTo(int[] indices,
int length)
public int[] indexOfAll(CharSequence s)
BasedSequenceindexOfAll in interface BasedSequences - sequence whose indices to findpublic BasedSequence replace(CharSequence find, CharSequence replace)
BasedSequencereplace in interface BasedSequencefind - sequence to findreplace - replacement sequencepublic BasedSequence append(CharSequence... others)
append in interface BasedSequencepublic int getColumnAtIndex(int index)
getColumnAtIndex in interface BasedSequencepublic Pair<Integer,Integer> getLineColumnAtIndex(int index)
BasedSequencegetLineColumnAtIndex in interface BasedSequenceindex - index for which to get line informationpublic boolean equalsIgnoreCase(CharSequence other)
BasedSequenceequalsIgnoreCase in interface BasedSequenceother - characters to match againstpublic boolean equals(Object other, boolean ignoreCase)
BasedSequenceequals in interface BasedSequenceother - characters to match againstignoreCase - case ignored when truepublic int compareTo(CharSequence other)
compareTo in interface Comparable<CharSequence>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.