| java.lang.Object java.lang.AbstractStringBuilder
Method Summary | |
final void | append0(char chars) | final void | append0(char chars, int start, int length) | final void | append0(char ch) | final void | append0(String string) | final void | append0(CharSequence s, int start, int end) | final void | appendNull() | public int | capacity() Answers the number of characters this StringBuffer can hold without
growing. | public char | charAt(int index) Retrieves the character at the index .
Parameters: index - The index of character in this object to retrieve. | public int | codePointAt(int index) Retrieves the Unicode code point value at the index .
Parameters: index - The index to the char code unit within thisobject. | public int | codePointBefore(int index) Retrieves the Unicode code point value that precedes the
index .
Parameters: index - The index to the char code unit within thisobject. | public int | codePointCount(int beginIndex, int endIndex) Calculates the number of Unicode code points between
beginIndex and endIndex .
Parameters: beginIndex - The inclusive beginning index of the subsequence. Parameters: endIndex - The exclusive end index of the subsequence. | final void | delete0(int start, int end) | final void | deleteCharAt0(int location) | public void | ensureCapacity(int min) Ensures that this object has a minimum capacity available before
requiring the internal buffer to be enlarged. | public void | getChars(int start, int end, char[] dest, int destStart) Copies the requested sequence of characters to be copied to the
char[] passed. | final char[] | getValue() | public int | indexOf(String string) Searches in this StringBuffer for the first index of the specified
character. | public int | indexOf(String subString, int start) Searches in this StringBuffer for the index of the specified character. | final void | insert0(int index, char[] chars) | final void | insert0(int index, char[] chars, int start, int length) | final void | insert0(int index, char ch) | final void | insert0(int index, String string) | final void | insert0(int index, CharSequence s, int start, int end) | public int | lastIndexOf(String string) Searches in this StringBuffer for the last index of the specified
character. | public int | lastIndexOf(String subString, int start) Searches in this StringBuffer for the index of the specified character. | public int | length() The current length of this object. | public int | offsetByCodePoints(int index, int codePointOffset) Returns the index within this object that is offset from
index by codePointOffset code points.
Parameters: index - The index within this object to calculate the offset from. Parameters: codePointOffset - The number of code points to count. | final void | replace0(int start, int end, String string) | final void | reverse0() | final void | set(char[] val, int len) | public void | setCharAt(int index, char ch) Sets the character at the index in this object. | public void | setLength(int length) Sets the current length to a new value. | final char[] | shareValue() | public CharSequence | subSequence(int start, int end) Returns a CharSequence of the subsequence of this object
from the start index to the start index.
Parameters: start - The inclusive start index to begin the subsequence. Parameters: end - The exclusive end index to end the subsequence. | public String | substring(int start) Returns the String value of the subsequence of this object from the
start index to the current end.
Parameters: start - The inclusive start index to begin the subsequence. | public String | substring(int start, int end) Returns the String value of the subsequence of this object from the
start index to the start index.
Parameters: start - The inclusive start index to begin the subsequence. Parameters: end - The exclusive end index to end the subsequence. | public String | toString() Returns the current String representation of this object. | public void | trimToSize() Trims off any extra capacity beyond the current length. |
INITIAL_CAPACITY | final static int INITIAL_CAPACITY(Code) | | |
AbstractStringBuilder | AbstractStringBuilder()(Code) | | |
AbstractStringBuilder | AbstractStringBuilder(int capacity)(Code) | | |
AbstractStringBuilder | AbstractStringBuilder(String string)(Code) | | |
append0 | final void append0(char chars)(Code) | | |
append0 | final void append0(char chars, int start, int length)(Code) | | |
append0 | final void append0(char ch)(Code) | | |
appendNull | final void appendNull()(Code) | | |
codePointCount | public int codePointCount(int beginIndex, int endIndex)(Code) | | Calculates the number of Unicode code points between
beginIndex and endIndex .
Parameters: beginIndex - The inclusive beginning index of the subsequence. Parameters: endIndex - The exclusive end index of the subsequence. The number of Unicode code points in the subsequence. throws: IndexOutOfBoundsException - if beginIndex is negative or greater thanendIndex or endIndex is greaterthan AbstractStringBuilder.length(). since: 1.5 |
delete0 | final void delete0(int start, int end)(Code) | | |
deleteCharAt0 | final void deleteCharAt0(int location)(Code) | | |
ensureCapacity | public void ensureCapacity(int min)(Code) | | Ensures that this object has a minimum capacity available before
requiring the internal buffer to be enlarged. The general policy of this
method is that if the minimumCapacity is larger than the
current
AbstractStringBuilder.capacity() , then the capacity will be increased to the
largest value of either the minimumCapacity or the current
capacity multiplied by two plus two. Although this is the general policy,
there is no guarantee that the capacity will change.
Parameters: min - The new minimum capacity to set. |
getChars | public void getChars(int start, int end, char[] dest, int destStart)(Code) | | Copies the requested sequence of characters to be copied to the
char[] passed.
Parameters: start - The inclusive start index of the characters to copy from thisobject. Parameters: end - The exclusive end index of the characters to copy from thisobject. Parameters: dest - The char[] to copy the characters to. Parameters: destStart - The inclusive start index of the dest parameterto begin copying to. throws: IndexOutOfBoundsException - if the start is negative, thedestStart is negative, the start is greater than end , the end is greater than the current AbstractStringBuilder.length() ordestStart + end - begin is greater thandest.length . |
getValue | final char[] getValue()(Code) | | |
indexOf | public int indexOf(String string)(Code) | | Searches in this StringBuffer for the first index of the specified
character. The search for the character starts at the beginning and moves
towards the end.
Parameters: string - the string to find the index in this StringBuffer of the specified character, -1 ifthe character isn't found See Also: AbstractStringBuilder.lastIndexOf(String) since: 1.4 |
indexOf | public int indexOf(String subString, int start)(Code) | | Searches in this StringBuffer for the index of the specified character.
The search for the character starts at the specified offset and moves
towards the end.
Parameters: subString - the string to find Parameters: start - the starting offset the index in this StringBuffer of the specified character, -1 ifthe character isn't found See Also: AbstractStringBuilder.lastIndexOf(String,int) since: 1.4 |
insert0 | final void insert0(int index, char[] chars)(Code) | | |
insert0 | final void insert0(int index, char[] chars, int start, int length)(Code) | | |
insert0 | final void insert0(int index, char ch)(Code) | | |
lastIndexOf | public int lastIndexOf(String string)(Code) | | Searches in this StringBuffer for the last index of the specified
character. The search for the character starts at the end and moves
towards the beginning.
Parameters: string - the string to find the index in this StringBuffer of the specified character, -1 ifthe character isn't found throws: NullPointerException - if the string parameter is null . See Also: String.lastIndexOf(java.lang.String) since: 1.4 |
lastIndexOf | public int lastIndexOf(String subString, int start)(Code) | | Searches in this StringBuffer for the index of the specified character.
The search for the character starts at the specified offset and moves
towards the beginning.
Parameters: subString - the string to find Parameters: start - the starting offset the index in this StringBuffer of the specified character, -1 ifthe character isn't found throws: NullPointerException - if the subString parameter isnull . See Also: String.lastIndexOf(java.lang.Stringint) since: 1.4 |
length | public int length()(Code) | | The current length of this object.
the number of characters in this StringBuffer |
offsetByCodePoints | public int offsetByCodePoints(int index, int codePointOffset)(Code) | | Returns the index within this object that is offset from
index by codePointOffset code points.
Parameters: index - The index within this object to calculate the offset from. Parameters: codePointOffset - The number of code points to count. The index within this object that is the offset. throws: IndexOutOfBoundsException - if index is negative or greater thanAbstractStringBuilder.length() or if there aren't enough code pointsbefore or after index to matchcodePointOffset . since: 1.5 |
replace0 | final void replace0(int start, int end, String string)(Code) | | |
reverse0 | final void reverse0()(Code) | | |
setCharAt | public void setCharAt(int index, char ch)(Code) | | Sets the character at the index in this object.
Parameters: index - the zero-based index of the character to replace. Parameters: ch - the character to set. throws: IndexOutOfBoundsException - if index is negative or greater than or equalto the current AbstractStringBuilder.length(). |
setLength | public void setLength(int length)(Code) | | Sets the current length to a new value. If the new length is larger than
the current length, then the new characters at the end of this object
will contain the char value of \u0000 .
Parameters: length - the new length of this StringBuffer exception: IndexOutOfBoundsException - when length < 0 See Also: AbstractStringBuilder.length |
shareValue | final char[] shareValue()(Code) | | |
subSequence | public CharSequence subSequence(int start, int end)(Code) | | Returns a CharSequence of the subsequence of this object
from the start index to the start index.
Parameters: start - The inclusive start index to begin the subsequence. Parameters: end - The exclusive end index to end the subsequence. A CharSequence containing the subsequence. throws: IndexOutOfBoundsException - if start is negative, greater than the currentAbstractStringBuilder.length() or greater than end . since: 1.4 |
substring | public String substring(int start)(Code) | | Returns the String value of the subsequence of this object from the
start index to the current end.
Parameters: start - The inclusive start index to begin the subsequence. A String containing the subsequence. throws: StringIndexOutOfBoundsException - if start is negative or greater than thecurrent AbstractStringBuilder.length(). |
substring | public String substring(int start, int end)(Code) | | Returns the String value of the subsequence of this object from the
start index to the start index.
Parameters: start - The inclusive start index to begin the subsequence. Parameters: end - The exclusive end index to end the subsequence. A String containing the subsequence. throws: StringIndexOutOfBoundsException - if start is negative, greater than the currentAbstractStringBuilder.length() or greater than end . |
toString | public String toString()(Code) | | Returns the current String representation of this object.
a String containing the characters in this StringBuilder. |
trimToSize | public void trimToSize()(Code) | | Trims off any extra capacity beyond the current length. Note, this method
is NOT guaranteed to change the capacity of this object.
since: 1.5 |
|
|