|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.StringBuilder
public class StringBuilder
Class representing a mutable character string.
Constructor Summary | |
---|---|
StringBuilder()
Constructs an empty StringBuilder and allocates a default length initial buffer. |
|
StringBuilder(int length)
Constructs an empty StringBuilder and allocates an initial buffer of the length specified. |
|
StringBuilder(String string)
Constructs a StringBuilder containing the characters in the specified String. |
Method Summary | |
---|---|
StringBuilder |
append(boolean b)
Appends "true" or "false" to this StringBuilder based on the boolean value specified. |
StringBuilder |
append(char value)
Appends the specified character to this StringBuilder. |
StringBuilder |
append(char[] chars)
Appends the characters from the specified array to this StringBuilder. |
StringBuilder |
append(char[] chars,
int offset,
int count)
Appends the characters from the specified array to this StringBuilder. |
StringBuilder |
append(double value)
Appends a string representation of the specified value to this StringBuilder. |
StringBuilder |
append(float f)
Appends a string represetation of the specified value to this StringBuilder. |
StringBuilder |
append(int value)
Appends a string represetation of the specified value to this StringBuilder. |
StringBuilder |
append(long value)
Appends a string represetation of the specified value to this StringBuilder. |
StringBuilder |
append(Object object)
Appends the String representation of the specified object to this StringBuilder. |
StringBuilder |
append(String string)
Appends the characters from the specified String to this StringBuilder. |
void |
ensureCapacity(int minimumLength)
Ensures the buffer is large enough to hold the minimum length specified. |
int |
length()
Returns the current length of the string. |
void |
setLength(int newLength)
Sets the length of the string. |
String |
toString()
Returns a String containing the character sequence in this StringBuilder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait |
Constructor Detail |
---|
public StringBuilder()
public StringBuilder(int length)
length
- size of buffer to allocatepublic StringBuilder(String string)
string
- String to initialize the buffer fromMethod Detail |
---|
public StringBuilder append(boolean b)
b
- boolean value to append
public StringBuilder append(char value)
value
- character to append
public StringBuilder append(char[] chars)
chars
- character array
public StringBuilder append(char[] chars, int offset, int count)
chars
- character arrayoffset
- starting offset in arraycount
- characters to take from array
public StringBuilder append(double value)
value
- value whose string representation is to be appended
public StringBuilder append(float f)
f
- value whose string representation is to be appended
public StringBuilder append(int value)
value
- value whose string representation is to be appended
public StringBuilder append(long value)
value
- value whose string representation is to be appended
public StringBuilder append(Object object)
object
- object whose string representation is to be appended
public StringBuilder append(String string)
string
- string to append
public void ensureCapacity(int minimumLength)
minimumLength
- minimum size bufferpublic int length()
public void setLength(int newLength)
newLength
- new length
IndexOutOfBoundsException
- if newLength < 0public String toString()
toString
in class Object
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |