| java.lang.Object java.lang.AbstractStringBuilder java.lang.StringBuilder
Method Summary | |
public StringBuilder | append(boolean b)
Appends the String representation of the boolean value
passed. | public StringBuilder | append(char c)
Appends the String representation of the char value
passed. | public StringBuilder | append(int i)
Appends the String representation of the int value passed.
The int value is converted to a String according to the
rule defined by
String.valueOf(int) .
Parameters: i - The int value to append to this object. | public StringBuilder | append(long lng)
Appends the String representation of the long value
passed. | public StringBuilder | append(float f)
Appends the String representation of the float value
passed. | public StringBuilder | append(double d)
Appends the String representation of the double value
passed. | public StringBuilder | append(Object obj)
Appends the String representation of the Object value
passed. | public StringBuilder | append(String str)
Appends the contents of the String. | public StringBuilder | append(StringBuffer sb)
Appends the contents of the StringBuffer. | public StringBuilder | append(char[] ch)
Appends the String representation of the char[] value
passed. | public StringBuilder | append(char[] str, int offset, int len)
Appends the String representation of the subset of the
char[] value passed. | public StringBuilder | append(CharSequence csq)
Appends the String representation of the CharSequence
value passed. | public StringBuilder | append(CharSequence csq, int start, int end)
Appends the String representation of the subsequence of the
CharSequence value passed. | public StringBuilder | appendCodePoint(int codePoint)
Appends the encoded Unicode code point to this object. | public StringBuilder | delete(int start, int end)
Deletes a sequence of characters within this object, shifts any remaining
characters to the left and adjusts the
StringBuilder.length() of this object.
Parameters: start - The inclusive start index to begin deletion. Parameters: end - The exclusive end index to stop deletion. | public StringBuilder | deleteCharAt(int index)
Deletes a single character within this object, shifts any remaining
characters to the left and adjusts the
StringBuilder.length() of this object.
Parameters: index - The index of the character to delete. | public StringBuilder | insert(int offset, boolean b)
Inserts the String representation of the boolean value
passed into this object at the offset passed. | public StringBuilder | insert(int offset, char c)
Inserts the String representation of the char value passed
into this object at the offset passed. | public StringBuilder | insert(int offset, int i)
Inserts the String representation of the int value passed
into this object at the offset passed. | public StringBuilder | insert(int offset, long l)
Inserts the String representation of the long value passed
into this object at the offset passed. | public StringBuilder | insert(int offset, float f)
Inserts the String representation of the float value
passed into this object at the offset passed. | public StringBuilder | insert(int offset, double d)
Inserts the String representation of the double value
passed into this object at the offset passed. | public StringBuilder | insert(int offset, Object obj)
Inserts the String representation of the Object value
passed into this object at the offset passed. | public StringBuilder | insert(int offset, String str)
Inserts the String value passed into this object at the
offset passed. | public StringBuilder | insert(int offset, char[] ch)
Inserts the String representation of the char[] value
passed into this object at the offset passed. | public StringBuilder | insert(int offset, char[] str, int strOffset, int strLen)
Inserts the String representation of the subsequence of the
char[] value passed into this object at the
offset passed. | public StringBuilder | insert(int offset, CharSequence s)
Inserts the String representation of the CharSequence
value passed into this object at the offset passed. | public StringBuilder | insert(int offset, CharSequence s, int start, int end)
Inserts the String representation of the subsequence of the
CharSequence value passed into this object at the
offset passed. | public StringBuilder | replace(int start, int end, String str)
Replaces the indicated subsequence of this object with the String passed.
If the String passed is longer or shorter than the subsequence, then this
object will be adjusted appropriately.
Parameters: start - The inclusive start index of the sequence to replace in thisobject. Parameters: end - The exclusive end index of the sequence to replace in thisobject. Parameters: str - The String to replace the subsequence. | public StringBuilder | reverse()
Reverses the contents of this object. | public String | toString() Answers the contents of this StringBuilder. |
StringBuilder | public StringBuilder(CharSequence seq)(Code) | |
Constructs an instance that's populated by a
CharSequence . The
capacity of the new builder will bee the length of the
CharSequence plus 16.
Parameters: seq - The CharSequence to copy into the builder. throws: NullPointerException - if the seq parameter isnull . |
StringBuilder | public StringBuilder(String str)(Code) | |
Constructs an instance that's populated by a
String . The
capacity of the new builder will bee the length of the
String plus 16.
Parameters: str - The String to copy into the builder. throws: NullPointerException - if the str parameter isnull . |
append | public StringBuilder append(boolean b)(Code) | |
Appends the String representation of the boolean value
passed. The boolean value is converted to a String
according to the rule defined by
String.valueOf(boolean) .
Parameters: b - The boolean value to append to this object. A reference to this object. See Also: String.valueOf(boolean) |
append | public StringBuilder append(char c)(Code) | |
Appends the String representation of the char value
passed. The char value is converted to a String according
to the rule defined by
String.valueOf(char) .
Parameters: c - The char value to append to this object. A reference to this object. See Also: String.valueOf(char) |
append | public StringBuilder append(int i)(Code) | |
Appends the String representation of the int value passed.
The int value is converted to a String according to the
rule defined by
String.valueOf(int) .
Parameters: i - The int value to append to this object. A reference to this object. See Also: String.valueOf(int) |
append | public StringBuilder append(long lng)(Code) | |
Appends the String representation of the long value
passed. The long value is converted to a String according
to the rule defined by
String.valueOf(long) .
Parameters: lng - The long value to append to this object. A reference to this object. See Also: String.valueOf(long) |
append | public StringBuilder append(float f)(Code) | |
Appends the String representation of the float value
passed. The float value is converted to a String according
to the rule defined by
String.valueOf(float) .
Parameters: f - The float value to append to this object. A reference to this object. See Also: String.valueOf(float) |
append | public StringBuilder append(double d)(Code) | |
Appends the String representation of the double value
passed. The double value is converted to a String
according to the rule defined by
String.valueOf(double) .
Parameters: d - The double value to append to this object. A reference to this object. See Also: String.valueOf(double) |
append | public StringBuilder append(String str)(Code) | |
Appends the contents of the String. If the String passed is
null , then the String "null" is appended.
Parameters: str - The String to append to this object. A reference to this object. |
append | public StringBuilder append(StringBuffer sb)(Code) | |
Appends the contents of the StringBuffer. If the StringBuffer passed is
null , then the StringBuffer "null" is
appended.
Parameters: sb - The StringBuffer to append to this object. A reference to this object. |
append | public StringBuilder append(char[] ch)(Code) | |
Appends the String representation of the char[] value
passed. The char[] value is converted to a String
according to the rule defined by
String.valueOf(char[]) .
Parameters: ch - The char[] value to append to this object. A reference to this object. See Also: String.valueOf(char[]) |
append | public StringBuilder append(char[] str, int offset, int len)(Code) | |
Appends the String representation of the subset of the
char[] value passed. The char[] value is
converted to a String according to the rule defined by
String.valueOf(char[]intint) .
Parameters: str - The char[] value to append to this object. Parameters: offset - The inclusive offset index to begin copying from thestr parameter. Parameters: len - The number of character to copy from the str parameter. A reference to this object. See Also: String.valueOf(char[]intint) |
append | public StringBuilder append(CharSequence csq)(Code) | |
Appends the String representation of the CharSequence
value passed. If the CharSequence is null ,
then the String "null" is appended.
Parameters: csq - The CharSequence value to append to thisobject. A reference to this object. |
append | public StringBuilder append(CharSequence csq, int start, int end)(Code) | |
Appends the String representation of the subsequence of the
CharSequence value passed. If the
CharSequence is null , then the String
"null" is used to extract the subsequence from.
Parameters: csq - The CharSequence value to append to thisobject. Parameters: start - The beginning index of the subsequence. Parameters: end - The ending index of the subsequence. A reference to this object. |
appendCodePoint | public StringBuilder appendCodePoint(int codePoint)(Code) | |
Appends the encoded Unicode code point to this object. The code point is
converted to a char[] as defined by
Character.toChars(int) .
Parameters: codePoint - The Unicode code point to encode and append. A reference to this object. See Also: Character.toChars(int) |
delete | public StringBuilder delete(int start, int end)(Code) | |
Deletes a sequence of characters within this object, shifts any remaining
characters to the left and adjusts the
StringBuilder.length() of this object.
Parameters: start - The inclusive start index to begin deletion. Parameters: end - The exclusive end index to stop deletion. A reference to this object. throws: StringIndexOutOfBoundsException - if start is lessthan zero, greater than the current length or greater thanend . |
deleteCharAt | public StringBuilder deleteCharAt(int index)(Code) | |
Deletes a single character within this object, shifts any remaining
characters to the left and adjusts the
StringBuilder.length() of this object.
Parameters: index - The index of the character to delete. A reference to this object. throws: StringIndexOutOfBoundsException - if index is lessthan zero or is greater than or equal to the current length. |
insert | public StringBuilder insert(int offset, String str)(Code) | |
Inserts the String value passed into this object at the
offset passed. If the String parameter is null, then the
String "null" is inserted.
Parameters: offset - The index of this object to insert the value. Parameters: str - The String to insert into this object. A reference to this object. throws: StringIndexOutOfBoundsException - if offset isnegative or greater than the current StringBuilder.length(). |
insert | public StringBuilder insert(int offset, char[] str, int strOffset, int strLen)(Code) | |
Inserts the String representation of the subsequence of the
char[] value passed into this object at the
offset passed. The char[] value is
converted to a String according to the rule defined by
String.valueOf(char[]intint) .
Parameters: offset - The index of this object to insert the value. Parameters: str - The char[] value to insert into this object. Parameters: strOffset - The inclusive index of the str parameterto start copying from. Parameters: strLen - The number of characters to copy from the str parameter. A reference to this object. throws: StringIndexOutOfBoundsException - if offset isnegative or greater than the current StringBuilder.length(). See Also: String.valueOf(char[]intint) |
insert | public StringBuilder insert(int offset, CharSequence s)(Code) | |
Inserts the String representation of the CharSequence
value passed into this object at the offset passed. The
CharSequence value is converted to a String as defined by
CharSequence.toString . If the CharSequence is
null , then the String "null" is inserted.
Parameters: offset - The index of this object to insert the value. Parameters: s - The CharSequence value to insert into thisobject. A reference to this object. throws: IndexOutOfBoundsException - if offset is negative orgreater than the current StringBuilder.length(). See Also: CharSequence.toString |
insert | public StringBuilder insert(int offset, CharSequence s, int start, int end)(Code) | |
Inserts the String representation of the subsequence of the
CharSequence value passed into this object at the
offset passed. The CharSequence value is
converted to a String as defined by
CharSequence.subSequence(intint) . If the
CharSequence is null , then the String
"null" is used to determine the subsequence.
Parameters: offset - The index of this object to insert the value. Parameters: s - The CharSequence value to insert into thisobject. Parameters: start - The start of the subsequence of the s parameter. Parameters: end - The end of the subsequence of the s parameter. A reference to this object. throws: IndexOutOfBoundsException - if offset is negative orgreater than the current StringBuilder.length(). See Also: CharSequence.subSequence(intint) |
replace | public StringBuilder replace(int start, int end, String str)(Code) | |
Replaces the indicated subsequence of this object with the String passed.
If the String passed is longer or shorter than the subsequence, then this
object will be adjusted appropriately.
Parameters: start - The inclusive start index of the sequence to replace in thisobject. Parameters: end - The exclusive end index of the sequence to replace in thisobject. Parameters: str - The String to replace the subsequence. A reference to this object. throws: StringIndexOutOfBoundsException - if start isnegative, greater than the current StringBuilder.length() or greaterthan end . throws: NullPointerException - if the str parameter isnull . |
reverse | public StringBuilder reverse()(Code) | |
Reverses the contents of this object.
A reference to this object. |
toString | public String toString()(Code) | | Answers the contents of this StringBuilder.
a String containing the characters in this StringBuilder |
Fields inherited from java.lang.AbstractStringBuilder | final static int INITIAL_CAPACITY(Code)(Java Doc)
|
Methods inherited from java.lang.AbstractStringBuilder | final void append0(char chars)(Code)(Java Doc) final void append0(char chars, int start, int length)(Code)(Java Doc) final void append0(char ch)(Code)(Java Doc) final void append0(String string)(Code)(Java Doc) final void append0(CharSequence s, int start, int end)(Code)(Java Doc) final void appendNull()(Code)(Java Doc) public int capacity()(Code)(Java Doc) public char charAt(int index)(Code)(Java Doc) public int codePointAt(int index)(Code)(Java Doc) public int codePointBefore(int index)(Code)(Java Doc) public int codePointCount(int beginIndex, int endIndex)(Code)(Java Doc) final void delete0(int start, int end)(Code)(Java Doc) final void deleteCharAt0(int location)(Code)(Java Doc) public void ensureCapacity(int min)(Code)(Java Doc) public void getChars(int start, int end, char[] dest, int destStart)(Code)(Java Doc) final char[] getValue()(Code)(Java Doc) public int indexOf(String string)(Code)(Java Doc) public int indexOf(String subString, int start)(Code)(Java Doc) final void insert0(int index, char[] chars)(Code)(Java Doc) final void insert0(int index, char[] chars, int start, int length)(Code)(Java Doc) final void insert0(int index, char ch)(Code)(Java Doc) final void insert0(int index, String string)(Code)(Java Doc) final void insert0(int index, CharSequence s, int start, int end)(Code)(Java Doc) public int lastIndexOf(String string)(Code)(Java Doc) public int lastIndexOf(String subString, int start)(Code)(Java Doc) public int length()(Code)(Java Doc) public int offsetByCodePoints(int index, int codePointOffset)(Code)(Java Doc) final void replace0(int start, int end, String string)(Code)(Java Doc) final void reverse0()(Code)(Java Doc) final void set(char[] val, int len) throws InvalidObjectException(Code)(Java Doc) public void setCharAt(int index, char ch)(Code)(Java Doc) public void setLength(int length)(Code)(Java Doc) final char[] shareValue()(Code)(Java Doc) public CharSequence subSequence(int start, int end)(Code)(Java Doc) public String substring(int start)(Code)(Java Doc) public String substring(int start, int end)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void trimToSize()(Code)(Java Doc)
|
|
|