| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| public | IRichSequenceBase(int
hash code for the char sequence. hash)Constructor with pre-computed hash if available, 0 for lazy computation if length() not 0 Note the hash code computed for this class is equivalent to the string hash of the same characters to ensure that equals can use the hash code for quick failure. |
| Modifier and Type | Method and Description |
|---|---|
| public final T | append(CharSequence...
list of char sequences to append to this sequence, null sequences are skipped sequences)Implements com. Concatenate this sequence and list of others, returning sequence of result |
| public final T | append(Iterable<? extends CharSequence> sequences)
Implements com.
|
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | appendRangesTo(@NotNull StringBuilder out, @Nullable CharMapper charMapper, Iterable<? extends Range> ranges)
|
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final @NotNull List | |
| public final @NotNull List | blankLinesRemovedRanges(int fromIndex)
Implements com.
|
| public final @NotNull List | blankLinesRemovedRanges(int fromIndex, int endIndex)
Implements com.
|
| public final @NotNull List | |
| public final int | |
| public int | compareTo(@NotNull CharSequence
the object to be compared. o)Implements java. Compares this object with the specified object for order. |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | countLeadingNotSpace(int startIndex)
Implements com.
|
| public final int | countLeadingNotSpace(int startIndex, int endIndex)
Implements com.
|
| public final int | |
| public final int | countLeadingNotSpaceTab(int startIndex)
Implements com.
|
| public final int | countLeadingNotSpaceTab(int startIndex, int endIndex)
Implements com.
|
| public final int | |
| public final int | countLeadingNotWhitespace(int startIndex)
Implements com.
|
| public final int | countLeadingNotWhitespace(int startIndex, int endIndex)
Implements com.
|
| public final int | |
| public final int | countLeadingSpace(int startIndex)
Implements com.
|
| public final int | countLeadingSpace(int startIndex, int endIndex)
Implements com.
|
| public final int | |
| public final int | countLeadingSpaceTab(int startIndex)
Implements com.
|
| public final int | countLeadingSpaceTab(int startIndex, int endIndex)
Implements com.
|
| public final int | |
| public final int | countLeadingWhitespace(int startIndex)
Implements com.
|
| public final int | countLeadingWhitespace(int startIndex, int endIndex)
Implements com.
|
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | countTrailingNotSpace(int fromIndex)
Implements com.
|
| public final int | countTrailingNotSpace(int startIndex, int fromIndex)
Implements com.
|
| public final int | |
| public final int | countTrailingNotSpaceTab(int fromIndex)
Implements com.
|
| public final int | countTrailingNotSpaceTab(int startIndex, int fromIndex)
Implements com.
|
| public final int | |
| public final int | countTrailingNotWhitespace(int fromIndex)
Implements com.
|
| public final int | countTrailingNotWhitespace(int startIndex, int fromIndex)
Implements com.
|
| public final int | |
| public final int | countTrailingSpace(int fromIndex)
Implements com.
|
| public final int | countTrailingSpace(int startIndex, int fromIndex)
Implements com.
|
| public final int | |
| public final int | countTrailingSpaceTab(int fromIndex)
Implements com.
|
| public final int | countTrailingSpaceTab(int startIndex, int fromIndex)
Implements com.
|
| public final int | |
| public final int | countTrailingWhitespace(int fromIndex)
Implements com.
|
| public final int | countTrailingWhitespace(int startIndex, int fromIndex)
Implements com.
|
| public T | delete(int
start index of deletion startIndex, int end index, not inclusive, of insertion endIndex)Implements com. Delete range in sequence |
| public final char | endCharAt(int
offset from end of sequence index)Implements com. Convenience method to get characters offset from end of sequence. |
| public final int | |
| public final int | |
| public final int | |
| public final int | endOfLine(int
index where to start searching for end of line index)Implements com. Get the offset of the end of line at given index, end of line delimited by \n |
| public final int | endOfLineAnyEOL(int
index where to start searching for end of line index)Implements com. 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. |
| public final T | endSequence(int
offset from endIndex of sequence [ 0..length() ) startIndex, int offset from endIndex of sequence [ 0..length() ) endIndex)Implements com. Convenience method to get characters offset from endIndex of sequence. |
| public final T | endSequence(int
offset from endIndex of sequence [ 0..length() ) startIndex)Implements com. Convenience method to get characters offset from endIndex of sequence. |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final int | eolEndLength()
Implements com. Get the length of EOL character at the end of this sequence, if present. |
| public final int | eolEndLength(int
index where the EOL ends, if any, any value can be passed for this
argument. If > length of this sequence then it is the same as passing length(),
if 0 or less then 0 is returned. eolEnd)Implements com. Get the length of EOL character at the given index of this sequence, if present. |
| public final @NotNull Range | eolEndRange(int
index where the EOL ends, if any, any value can be passed for this
argument. If > length of this sequence then it is the same as passing length(),
if 0 or less then 0 is returned. eolEnd)Implements com. Return Range of eol at given index |
| public final int | eolStartLength(int
index where the EOL starts, if any, any value can be passed for this
argument. If >= length of this sequence then 0 is returned
if 0 or less then it is the same as 0 eolStart)Implements com. Get the length of EOL character at the given index of this sequence, if present. |
| public @NotNull Range | eolStartRange(int
index where the EOL starts, if any, any value can be passed for this
argument. If >= length of this sequence then 0 is returned
if 0 or less then it is the same as 0 eolStart)Implements com. Return Range of eol at given index |
| public final boolean | Returns: true if character contents are equalany char sequence o)Overrides java. Equality comparison based on character content of this sequence, with quick fail resorting to content comparison only if length and hashCodes are equal |
| public final boolean | |
| public final boolean | |
| public final T | extractRanges(Range...
ranges to extract ranges)Implements com. Build a sequence of ranges in this sequence Note BasedSequence ranges must be non-overlapping and ordered by startOffset or IllegalArgumentException will be thrown |
| public final T | extractRanges(Iterable<Range> ranges)
Implements com.
|
| public final char | |
| public final int | Returns: hash code of equivalent stringOverrides java. Implements com. String hash code computation |
| public final T | ifNull(T
based sequence to return if this is nullSequence() other)Implements com. If this sequence is the nullSequence() instance then returns other, otherwise returns this sequence. |
| public final T | ifNullEmptyAfter(T
based sequence from which to take the empty sequence other)Implements com. If this sequence is the nullSequence() instance then returns an empty subSequence from the end of other, otherwise returns this sequence. |
| public final T | ifNullEmptyBefore(T
based sequence from which to take the empty sequence other)Implements com. If this sequence is the nullSequence() instance then returns an empty subSequence from the start of other, otherwise returns this sequence. |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | indexOf(char c, int fromIndex, int endIndex)
Implements com.
|
| public final @NotNull int[] | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | indexOfNot(char c, int fromIndex)
Implements com.
|
| public final int | indexOfNot(char c, int fromIndex, int endIndex)
Implements com.
|
| public T | |
| public final boolean | |
| public boolean | |
| public final boolean | isEmpty()
Implements com. Returns |
| public boolean | |
| public boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final char | |
| public final int | |
| public final int | lastIndexOf(char c, int fromIndex)
Implements com.
|
| public final int | |
| public final int | |
| public final int | |
| public final int | lastIndexOf(char c, int startIndex, int fromIndex)
Implements com.
|
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | lastIndexOfNot(char c, int fromIndex)
Implements com.
|
| public final int | lastIndexOfNot(char c, int startIndex, int fromIndex)
Implements com.
|
| public final @NotNull Range | |
| public final @NotNull Range | leadingBlankLinesRange(int startIndex)
Implements com.
|
| public final @NotNull Range | leadingBlankLinesRange(int fromIndex, int endIndex)
Implements com.
|
| public final @NotNull Range | |
| public final T | lineAt(int
index at which to get the line index)Implements com. Get the line characters at given index, line delimited by \n |
| public final T | lineAtAnyEOL(int
index at which to get the line index)Implements com. Get the line characters at given index, line delimited by \n, \r or \r\n |
| public final @NotNull Pair | lineColumnAtIndex(int
index for which to get line information index)Implements com. Get the line and column information from index into sequence |
| public final @NotNull Range | lineRangeAt(int
index at which to get the line index)Implements com. Get the line characters at given index, line delimited by \n |
| public final @NotNull Range | lineRangeAtAnyEOL(int
index at which to get the line index)Implements com. Get the line characters at given index, line delimited by \n, \r or \r\n |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | matchedCharCount(@NotNull CharSequence chars, int startIndex, int endIndex, boolean fullMatchOnly, boolean ignoreCase)
|
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | |
| public final int | matchedCharCountReversed(@NotNull CharSequence chars, int startIndex, int fromIndex, boolean ignoreCase)
|
| public final int | |
| public final int | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final char | midCharAt(int
of character to get index)Implements com. Convenience method to get characters offset from start or end of sequence. |
| public final T | midSequence(int
offset into this sequence startIndex, int offset into this sequence endIndex)Implements com. Convenience method to get characters offset from start or end of sequence. |
| public final T | midSequence(int
offset into this sequence startIndex)Implements com. Convenience method to get characters offset from start or end of sequence. |
| public final @NotNull String | normalizeEndWithEOL()
Implements com. replace any \r\n and \r by \n, append terminating EOL if one is not present |
| public final @NotNull String | normalizeEOL()
Implements com. replace any \r\n and \r by \n |
| public final T | nullIf(boolean
when true return NULL else this condition)Implements com. If condition is true return nullSequence() otherwise returns this sequence. |
| public final T | |
| public final T | nullIf(CharSequence...
match sequence list matches)Implements com. If this sequence matches one of given sequences return nullSequence() otherwise returns this sequence. |
| public final T | |
| public final T | nullIfBlank()
Implements com. If this sequence is blank return nullSequence() otherwise returns this sequence. |
| public final T | nullIfEmpty()
Implements com. If this sequence is empty return nullSequence() otherwise returns this sequence. |
| public final T | nullIfEndsWith(CharSequence... matches)
Implements com.
|
| public final T | nullIfEndsWith(boolean ignoreCase, CharSequence... matches)
Implements com.
|
| public final T | |
| public final T | |
| public final T | |
| public final T | nullIfNot(CharSequence... matches)
Implements com.
|
| public final T | nullIfNotEndsWith(CharSequence... matches)
Implements com.
|
| public final T | nullIfNotEndsWith(boolean ignoreCase, CharSequence... matches)
Implements com.
|
| public final T | |
| public final T | nullIfNotStartsWith(CharSequence... matches)
Implements com.
|
| public final T | nullIfNotStartsWith(boolean ignoreCase, CharSequence... matches)
Implements com.
|
| public final T | |
| public final T | nullIfStartsWith(CharSequence... matches)
Implements com.
|
| public final T | nullIfStartsWith(boolean ignoreCase, CharSequence... matches)
Implements com.
|
| public final T | |
| public final T | padding(int
length length, char char to use for padding pad)Implements com. Get the chars needed for padding to length |
| public final T | |
| public T | |
| public T | |
| public T | padStart(int
length to pad length, char char to use for padding pad)Implements com. Pad this sequence to given length |
| public T | |
| public final T | |
| public final T | |
| public final T | |
| public T | |
| public final T | |
| public final T | |
| public final T | prefixWithSpaces(int count)
Implements com.
|
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public char | safeCharAt(int
index index)Implements com. return char at index or '\0' if index <0 or >=length() |
| public T | safeSubSequence(int
offset from startIndex of this sequence startIndex, int offset from startIndex of this sequence endIndex)Implements com. Get a portion of this sequence, if index < 0 use 0, if > length() use length Note the returned value should only depend on start/end indices. |
| public T | safeSubSequence(int
offset from startIndex of this sequence startIndex)Implements com. Get a portion of this sequence, if index < 0 use 0, if > length() use length Note the returned value should only depend on start/end indices. |
| public final T | |
| public final T | |
| public final T[] | |
| public final T[] | |
| public final T[] | split(@NotNull CharSequence delimiter, int limit, boolean includeDelims, @Nullable CharPredicate trimChars)
|
| public final T[] | |
| public final T[] | |
| public final T[] | |
| public final T[] | splitEOL(boolean includeDelims)
Implements com.
|
| public final @NotNull List | |
| public final @NotNull List | splitList(@NotNull CharSequence delimiter, int limit, boolean includeDelims, @Nullable CharPredicate trimChars)
|
| public final @NotNull List | |
| public final @NotNull List | splitList(@NotNull CharSequence delimiter, boolean includeDelims, @Nullable CharPredicate trimChars)
|
| public final @NotNull List | |
| public final @NotNull List | |
| public final @NotNull List | splitListEOL(boolean includeDelims)
Implements com.
|
| public final @NotNull List | |
| public final int | |
| public final int | |
| public final int | |
| public final int | startOfLine(int
index where to start searching for end of line index)Implements com. Get the offset of the start of line at given index, start of line delimited by \n |
| public final int | startOfLineAnyEOL(int
index where to start searching for end of line index)Implements com. Get the offset of the start of line at given index, start of line delimited by \n or any of \n \r \r\n for Any methods. |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final T | subSequence(int
offset from startIndex of this sequence startIndex)Implements com. Get a portion of this sequence starting from a given offset to endIndex of the sequence |
| public final T | Returns: sequence whose contents reflect the selected portion, if range.isNull() then this is returnedrange to get, coordinates offset form start of this sequence range)Get a portion of this sequence selected by range |
| public final T | Returns: sequence whose contents come after the selected range, if range.isNull() thennullSequence()range to get, coordinates offset form start of this sequence range)Get a portion of this sequence after one selected by range |
| public final T | Returns: sequence whose contents come before the selected range, if range.isNull() thennullSequence()range to get, coordinates offset form start of this sequence range)Get a portion of this sequence before one selected by range |
| public final Pair | Returns: sequence whose contents come before and after the selected range, if range.isNull() thennullSequence()range to get, coordinates offset form start of this sequence range)Get a portions of this sequence before and after one selected by range |
| public final T | |
| public final T | |
| public final T | |
| public T | |
| public final T | |
| public final T | |
| public final T | suffixWithSpaces(int count)
Implements com.
|
| public final T | toLowerCase()
Implements com. Map characters of this sequence to: Uppercase, Lowercase or use custom mapping |
| public final T | toNbSp()
Implements com. Map spaces to non break spaces |
| public final T | toSpc()
Implements com. Map non break spaces to spaces |
| public @NotNull String | toString()
Overrides java. Implements java. Returns a string containing the characters in this sequence in the same order as this sequence. |
| public @Nullable String | toStringOrNull()
Implements com. Return string or null if BaseSequence.NULL |
| public final T | |
| public final @NotNull String | |
| public final @NotNull Range | |
| public final @NotNull Range | trailingBlankLinesRange(int fromIndex)
Implements com.
|
| public final @NotNull Range | trailingBlankLinesRange(int startIndex, int fromIndex)
Implements com.
|
| public final @NotNull Range | trailingBlankLinesRange(CharPredicate
characters to consider as EOL, note eolChars, int eolStartLength(int) should report length of EOL found if length > 1index in sequence from which to start blank line search, also maximum index to include in blank lines range
can be any value, if less than 0 it is the same as 0,
if greater than length() it is the same as length() startIndex, int maximum index in sequence to check and include in range of blank lines
can be any value, if less than 0 it is the same as 0,
if greater than length() it is the same as length() fromIndex)Implements com. Get Range of trailing blank lines at given index offsets in sequence |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final T | trimEOL()
Implements com. Trim last eol at the end of this sequence, |
| public final T | |
| public final @NotNull Pair | |
| public final @NotNull Pair | |
| public final @NotNull Pair | |
| public final @NotNull Pair | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final T | trimmedEOL()
Implements com. Get Trimmed part by |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final T | |
| public final T | |
| public final T | |
| public final T | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final @NotNull Range | |
| public final T | trimTailBlankLines()
Implements com. Trim leading trailing blank lines in this sequence |
| public T | trimToEndOfLine(boolean includeEol)
Implements com.
|
| public T | trimToEndOfLine(int index)
Implements com.
|
| public T | |
| public T | trimToEndOfLine(boolean includeEol, int index)
Implements com.
|
| public T | |
| public T | trimToStartOfLine(boolean includeEol)
Implements com.
|
| public T | trimToStartOfLine(int index)
Implements com.
|
| public T | |
| public T | trimToStartOfLine(boolean includeEol, int index)
Implements com.
|
| public T | |
| public final void | |
| public final void | |
| public final void |