Implements a modifiable string. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.
Unless otherwise noted, passing a null
argument to a constructor
or method in this class will cause a NullPointerException
to be
thrown.
Modifier and Type | Field and Description |
---|---|
pack-priv byte | coder
The id of the encoding used to encode the bytes in |
pack-priv int | count
The count is the number of characters used. |
private static final byte[] | |
pack-priv boolean | maybeLatin1
The attribute indicates |
pack-priv byte[] | value
The value is used for character storage. |
Access | Constructor and Description |
---|---|
pack-priv | |
pack-priv | |
pack-priv | AbstractStringBuilder(String
the string to copy. str)Constructs an AbstractStringBuilder that contains the same characters
as the specified |
pack-priv | AbstractStringBuilder(CharSequence
the sequence to copy. seq)Constructs an AbstractStringBuilder that contains the same characters
as the specified |
Modifier and Type | Method and Description |
---|---|
public AbstractStringBuilder | |
public AbstractStringBuilder | |
public AbstractStringBuilder | Returns: a reference to this object.the sb)StringBuffer to append.Appends the specified |
pack-priv AbstractStringBuilder | |
public AbstractStringBuilder | append(CharSequence
The character sequence to append. If s)csq is
null , then the four characters "null" are
appended to this Appendable.Implements java. Appendable .
|
public AbstractStringBuilder | Returns: a reference to this object.the sequence to append. s, int the starting index of the subsequence to be appended. start, int the end index of the subsequence to be appended. end)Implements java. CharSequence to this
sequence.
|
public AbstractStringBuilder | Returns: a reference to this object.the characters to be appended. str)Appends the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.the characters to be appended. str, int the index of the first offset, int char to append.the number of len)char s to append.Appends the string representation of a subarray of the
|
public AbstractStringBuilder | Returns: a reference to this object.a b)boolean .Appends the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.a c)char .Implements java. char
argument to this sequence.
|
public AbstractStringBuilder | Returns: a reference to this object.an i)int .Appends the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.a l)long .Appends the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.a f)float .Appends the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.a d)double .Appends the string representation of the |
private final void | |
private final void | |
private final void | |
public AbstractStringBuilder | Returns: a reference to this object.a Unicode code point codePoint)Appends the string representation of the |
private AbstractStringBuilder | |
public int | |
public char | Returns: thechar value at the specified index.the index of the desired index)char value.Implements java. char value in this sequence at the specified index.
|
public IntStream | chars()
Overrides default java. int zero-extending the char values
from this sequence.
|
public int | Returns: the code point value of the character at theindex the index to the index)char valuesReturns the character (Unicode code point) at the specified index. |
public int | Returns: the Unicode code point value before the given index.the index following the code point that should be returned index)Returns the character (Unicode code point) before the specified index. |
public int | Returns: the number of Unicode code points in the specified text rangethe index to the first beginIndex, int char of
the text range.the index after the last endIndex)char of
the text range.Returns the number of Unicode code points in the specified text range of this sequence. |
public IntStream | codePoints()
Overrides default java. |
pack-priv int | compareTo(AbstractStringBuilder another)
Compares the objects of two AbstractStringBuilder implementations lexicographically. |
public AbstractStringBuilder | Returns: This object.The beginning index, inclusive. start, int The ending index, exclusive. end)Removes the characters in a substring of this sequence. |
public AbstractStringBuilder | Returns: This object.Index of index)char to removeRemoves the |
public void | ensureCapacity(int
the minimum desired capacity. minimumCapacity)Ensures that the capacity is at least equal to the specified minimum. |
private void | ensureCapacityInternal(int minimumCapacity)
For positive values of |
pack-priv void | |
public void | getChars(int
start copying at this offset. srcBegin, int stop copying at this offset. srcEnd, char[] the array to copy the data into. dst, int offset into dstBegin)dst .Characters are copied from this sequence into the
destination character array |
pack-priv final byte | |
pack-priv final byte[] | |
public int | |
public int | Returns: the index of the first occurrence of the specified substring, starting at the specified index, or-1 if there is no such occurrence.the substring to search for. str, int the index from which to start the search. fromIndex)Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. |
private void | inflate()
If the coder is "isLatin1", this inflates the internal 8-bit storage to 16-bit <hi=0, low> pair storage. |
private void | |
private void | |
pack-priv void | |
public AbstractStringBuilder | Returns: This objectposition at which to insert subarray. index, char[] A str, int char array.the index of the first offset, int char in subarray to
be inserted.the number of len)char s in the subarray to
be inserted.Inserts the string representation of a subarray of the |
public AbstractStringBuilder | |
public AbstractStringBuilder | |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, char[] a character array. str)Inserts the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.the offset. dstOffset, CharSequence the sequence to be inserted s)Inserts the specified |
public AbstractStringBuilder | Returns: a reference to this object.the offset in this sequence. dstOffset, CharSequence the sequence to be inserted. s, int the starting index of the subsequence to be inserted. start, int the end index of the subsequence to be inserted. end)Inserts a subsequence of the specified |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, boolean a b)boolean .Inserts the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, char a c)char .Inserts the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, int an i)int .Inserts the string representation of the second |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, long a l)long .Inserts the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, float a f)float .Inserts the string representation of the |
public AbstractStringBuilder | Returns: a reference to this object.the offset. offset, double a d)double .Inserts the string representation of the |
pack-priv final boolean | |
public int | Returns: the index of the last occurrence of the specified substring, or-1 if there is no such occurrence.the substring to search for. str)Returns the index within this string of the last occurrence of the specified substring. |
public int | Returns: the index of the last occurrence of the specified substring, searching backward from the specified index, or-1 if there is no such occurrence.the substring to search for. str, int the index to start the search from. fromIndex)Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index. |
public int | Returns: the length of the sequence of characters currently represented by this objectImplements java. |
pack-priv long | Returns: updated accumulation of length and coderrunning accumulation of length and coder lengthCoder)Used by StringConcatHelper via JLA. |
private int | newCapacity(int
the desired minimum capacity minCapacity)Returns a capacity at least as large as the given minimum capacity. |
public int | Returns: the index within this sequencethe index to be offset index, int the offset in code points codePointOffset)Returns the index within this sequence that is offset from the
given |
pack-priv long | Returns: running accumulation of length and coder minus the number of characters addedrunning accumulation of length and coder lengthCoder, byte[] concatenation buffer buffer)Used by StringConcatHelper via JLA. |
private final void | |
private final void | |
private void | |
private void | |
private AbstractStringBuilder | |
public AbstractStringBuilder | Returns: a reference to this object.code point to append codePoint, int number of times to copy count)Repeats |
public AbstractStringBuilder | Returns: a reference to this object.a cs, int CharSequence number of times to copy count)Appends |
public AbstractStringBuilder | |
public AbstractStringBuilder | Returns: a reference to this object.Causes this character sequence to be replaced by the reverse of the sequence. |
public void | setCharAt(int
the index of the character to modify. index, char the new character. ch)The character at the specified index is set to |
public void | |
private void | |
public CharSequence | Returns: the specified subsequence.the start index, inclusive. start, int the end index, exclusive. end)Implements java. |
public String | Returns: The new string.The beginning index, inclusive. start)Returns a new |
public String | Returns: The new string.The beginning index, inclusive. start, int The ending index, exclusive. end)Returns a new |
public abstract String | Returns: a string representation of this sequence of characters.Redeclares java. Overrides java. |
public void |