Method Summary |
|
public char | charAt(int index) Returns the character at the specified index.
Parameters: index - the index of the character. |
public int | compareTo(Object csq) Compares this text to another character sequence or string
lexicographically.
Parameters: csq - the character sequence to be compared. |
public Text | concat(Text that) Concatenates the specified text to the end of this text. |
public boolean | contentEquals(CharSequence csq) Indicates if this text has the same character content as the specified
character sequence.
Parameters: csq - the character sequence to compare with. |
public boolean | contentEqualsIgnoreCase(CharSequence csq) Indicates if this text has the same character contend as the specified
character sequence ignoring case considerations. |
public Object | copy() |
public Text | delete(int start, int end) Returns the text without the characters between the specified indexes.
Parameters: start - the beginning index, inclusive. Parameters: end - the ending index, exclusive. |
public int | depth() Returns the depth of the internal tree used to represent this text. |
public boolean | endsWith(CharSequence suffix) Indicates if this text ends with the specified suffix.
Parameters: suffix - the suffix. |
public boolean | equals(Object obj) Compares this text against the specified object for equality.
Returns true if the specified object is a text having
the same character sequence as this text. |
public void | getChars(int start, int end, char dest, int destPos) Copies the characters from this text into the destination
character array. |
public int | hashCode() Returns the hash code for this text. |
public int | indexOf(CharSequence csq) Returns the index within this text of the first occurrence
of the specified character sequence searching forward.
Parameters: csq - a character sequence. |
public int | indexOf(CharSequence csq, int fromIndex) Returns the index within this text of the first occurrence
of the specified characters sequence searching forward from
the specified index.
Parameters: csq - a character sequence. Parameters: fromIndex - the index to start the search from. |
public int | indexOf(char c, int fromIndex) Returns the index within this text of the first occurrence of the
specified character, starting the search at the specified index.
Parameters: c - the character to search for. Parameters: fromIndex - the index to start the search from. |
public int | indexOfAny(CharSet charSet) Returns the index within this text of the first occurrence
of any character in the specified character set.
Parameters: charSet - the character set. |
public int | indexOfAny(CharSet charSet, int start) Returns the index within a region of this text of the first occurrence
of any character in the specified character set.
Parameters: charSet - the character set. Parameters: start - the index of the start of the search region in this text. |
public int | indexOfAny(CharSet charSet, int start, int length) Returns the index within a region of this text of the first occurrence
of any character in the specified character set.
Parameters: charSet - the character set. Parameters: start - the index of the start of the search region in this text. Parameters: length - the length of the region to search. |
public Text | insert(int index, Text txt) Returns the text having the specified text inserted at
the specified location.
Parameters: index - the insertion position. Parameters: txt - the text being inserted. |
public static Text | intern(CharSequence csq) Returns a text equals to the specified character sequence from a pool of
unique text instances in ImmortalMemory . |
public static Text | intern(String str) Returns a text equals to the specified string from a pool of
unique text instances in ImmortalMemory . |
public boolean | isBlank() Indicates if all characters of this text are whitespaces
(no characters greater than the space character). |
public boolean | isBlank(int start, int length) Indicates if the specified sub-range of characters of this text
are whitespaces (no characters greater than the space character). |
public int | lastIndexOf(CharSequence csq) Returns the index within this text of the last occurrence of
the specified characters sequence searching backward.
Parameters: csq - a character sequence. |
public int | lastIndexOf(CharSequence csq, int fromIndex) Returns the index within this text of the last occurrence of
the specified character sequence searching backward from the specified
index.
Parameters: csq - a character sequence. Parameters: fromIndex - the index to start the backward search from. |
public int | lastIndexOf(char c, int fromIndex) Returns the index within this text of the first occurrence of the
specified character, searching backward and starting at the specified
index.
Parameters: c - the character to search for. Parameters: fromIndex - the index to start the search backward from. |
public int | lastIndexOfAny(CharSet charSet) Returns the index within this text of the last occurrence
of any character in the specified character set.
Parameters: charSet - the character set. |
public int | lastIndexOfAny(CharSet charSet, int start) Returns the index within a region of this text of the last occurrence
of any character in the specified character set.
Parameters: charSet - the character set. Parameters: start - the index of the start of the search region in this text. |
public int | lastIndexOfAny(CharSet charSet, int start, int length) Returns the index within a region of this text of the last occurrence
of any character in the specified character set.
Parameters: charSet - the character set. Parameters: start - the index of the start of the search region in this text. Parameters: length - the length of the region to search. |
public int | length() Returns the length of this text. |
public Text | padLeft(int len) Pads this text on the left with spaces to make the minimum total length
as specified.
The new length of the new text is equal to the original length plus
(length()-len) spaces.
Parameters: len - the total number of characters to make this text equal to. |
public Text | padLeft(int len, char c) Pads this text on the left to make the minimum total length as specified.
Spaces or the given Unicode character are used to pad with.
The new length of the new text is equal to the original length plus
(length()-len) pad characters.
Parameters: len - the total number of characters to make this text equal to. Parameters: c - the character to pad using. |
public Text | padRight(int len) Pads this text on the right with spaces to make the minimum total length
as specified.
The new length of the new text is equal to the original length plus
(length()-len) spaces.
Parameters: len - the total number of characters to make this text equal to. |
public Text | padRight(int len, char c) Pads this text on the right to make the minimum total length as specified.
Spaces or the given Unicode character are used to pad with.
The new length of the new text is equal to the original length plus
(length()-len) pad characters.
Parameters: len - the total number of characters to make this text equal to. Parameters: c - the character to pad using. |
public Text | plus(Object obj) Returns the concatenation of this text and the textual
representation of the specified object.
Parameters: obj - the object whose textual representation is appended. |
public void | print() Prints out this text to System.out (UTF-8 encoding). |
public void | print(Writer writer) Prints out this text to the specified writer. |
public void | println() Prints out this text to System.out and then terminates the
line. |
public void | println(Writer writer) Prints out this text to the specified writer and then terminates
the line. |
public Text | replace(CharSequence target, CharSequence replacement) Replaces each character sequence of this text that matches the specified
target sequence with the specified replacement sequence.
Parameters: target - the character sequence to be replaced. Parameters: replacement - the replacement sequence. |
public Text | replace(CharSet charSet, CharSequence replacement) Replaces the specified characters in this text with the specified
replacement sequence.
Parameters: charSet - the set of characters to be replaced. Parameters: replacement - the replacement sequence. |
public boolean | startsWith(CharSequence prefix) Indicates if this text starts with the specified prefix.
Parameters: prefix - the prefix. |
public boolean | startsWith(CharSequence prefix, int index) Indicates if this text starts with the specified prefix
at the specified index.
Parameters: prefix - the prefix. Parameters: index - the index of the prefix location in this string. |
public CharSequence | subSequence(int start, int end) Returns
Text.subtext(int,int) subtext(start, end) .
Parameters: start - the index of the first character inclusive. Parameters: end - the index of the last character exclusive. |
public Text | subtext(int start) Returns a portion of this text.
Parameters: start - the index of the first character inclusive. |
public Text | subtext(int start, int end) Returns a portion of this text.
Parameters: start - the index of the first character inclusive. Parameters: end - the index of the last character exclusive. |
public Text | toLowerCase() Converts the characters of this text to lower case. |
public String | toString() Returns the String representation of this text. |
public Text | toText() Returns this (implements
javolution.lang.ValueType Realtime interface). |
public Text | toUpperCase() Converts the characters of this text to upper case. |
public Text | trim() Returns a copy of this text, with leading and trailing
whitespace omitted. |
public Text | trimEnd() Returns a copy of this text, with trailing
whitespace omitted. |
public Text | trimStart() Returns a copy of this text, with leading whitespace omitted. |
public static Text | valueOf(Object obj) Returns the text representing the specified object.
If the object is an instance of
Realtime
then
Realtime.toText is returned.
Parameters: obj - the object to represent as text. |
public static Text | valueOf(char[] chars) Returns the text that contains the characters from the specified
array.
Parameters: chars - the array source of the characters. |
public static Text | valueOf(char[] chars, int offset, int length) Returns the text that contains the characters from the specified
subarray of characters.
Parameters: chars - the source of the characters. Parameters: offset - the index of the first character in the data soure. Parameters: length - the length of the text returned. |
static Text | valueOf(TextBuilder tb, int start, int end) Converts a text builder to a text instance (optimization for
TextBuilder.toText()).
Parameters: start - the index of the first character inclusive. Parameters: end - the index of the last character exclusive. |
public static Text | valueOf(boolean b) Returns the text representation of the boolean argument.
Parameters: b - a boolean . |
public static Text | valueOf(char c) Returns the text instance corresponding to the specified character. |
public static Text | valueOf(int i) Returns the decimal representation of the specified int
argument.
Parameters: i - the int to format. |
public static Text | valueOf(int i, int radix) Returns the radix representation of the specified int
argument.
Parameters: i - the int to format. Parameters: radix - the radix (e.g. |
public static Text | valueOf(long l) Returns the decimal representation of the specified long
argument.
Parameters: l - the long to format. |
public static Text | valueOf(long l, int radix) Returns the radix representation of the specified long
argument.
Parameters: l - the long to format. Parameters: radix - the radix (e.g. |
public static Text | valueOf(char c, int length) Returns the text that contains a specific length sequence of the
character specified.
Parameters: c - the character to fill this text with. Parameters: length - the length of the text returned. |