Wednesday 13 March 2013

append(double)


append(double)


Parameters:
f - a float.
Returns: a reference to this StringBuffer object.
Since: CLDC 1.1
See Also: String.valueOf(float), append(String)
append(double)
Declaration:
public java.lang.StringBuffer append(double d)
Description:
Appends the string representation of the double argument to this string buffer.
The argument is converted to a string as if by the method String.valueOf, and the characters of that
string are then appended to this string buffer.
Parameters:
d - a double.
Returns: a reference to this StringBuffer object.
Since: CLDC 1.1
See Also: String.valueOf(double), append(String)
delete(int, int)
Declaration:
public java.lang.StringBuffer delete(int start, int end)
Description:
Removes the characters in a substring of this StringBuffer. The substring begins at the specified
start and extends to the character at index end - 1 or to the end of the StringBuffer if no such
character exists. If start is equal to end, no changes are made.
Parameters:
start - The beginning index, inclusive.
end - The ending index, exclusive.
Returns: This string buffer.
Throws:
StringIndexOutOfBoundsException - if start is negative, greater than length(), or
greater than end.
Since: JDK1.2
deleteCharAt(int)
Declaration:
public java.lang.StringBuffer deleteCharAt(int index)
Description:
Removes the character at the specified position in this StringBuffer (shortening the StringBuffer
by one character).

Parameters:
index - Index of character to remove
Returns: This string buffer.
Throws:
StringIndexOutOfBoundsException - if the index is negative or greater than or equal to
length().
Since: JDK1.2
insert(int, Object)
Declaration:
public java.lang.StringBuffer insert(int offset, java.lang.Object obj)
Description:
Inserts the string representation of the Object argument into this string buffer.
The second argument is converted to a string as if by the method String.valueOf, and the characters of
that string are then inserted into this string buffer at the indicated offset.
The offset argument must be greater than or equal to 0, and less than or equal to the length of this string
buffer.
Parameters:
offset - the offset.
obj - an Object.
Returns: a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also: String.valueOf(Object), insert(int, String), length()
insert(int, String)
Declaration:
public java.lang.StringBuffer insert(int offset, java.lang.String str)
Description:
Inserts the string into this string buffer.
The characters of the String argument are inserted, in order, into this string buffer at the indicated offset,
moving up any characters originally above that position and increasing the length of this string buffer by
the length of the argument. If str is null, then the four characters “null” are inserted into this string
buffer.
The character at index k in the new character sequence is equal to:
• the character at index k in the old character sequence, if k is less than offset
• the character at index k-offset in the argument str, if k is not less than offset but is less than
offset+str.length()
• the character at index k-str.length() in the old character sequence, if k is not less than
offset+str.length()
The offset argument must be greater than or equal to 0, and less than or equal to the length of this string
buffer


insert(int, char[])

Parameters:
offset - the offset.
str - a string.
Returns: a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also: length()
insert(int, char[])
Declaration:
public java.lang.StringBuffer insert(int offset, char[] str)
Description:
Inserts the string representation of the char array argument into this string buffer.
The characters of the array argument are inserted into the contents of this string buffer at the position
indicated by offset. The length of this string buffer increases by the length of the argument.
The overall effect is exactly as if the argument were converted to a string by the method
String.valueOf(char[]) and the characters of that string were then inserted into this
StringBuffer object at the position indicated by offset.
Parameters:
offset - the offset.
str - a character array.
Returns: a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
insert(int, boolean)
Declaration:
public java.lang.StringBuffer insert(int offset, boolean b)
Description:
Inserts the string representation of the boolean argument into this string buffer.
The second argument is converted to a string as if by the method String.valueOf, and the characters of
that string are then inserted into this string buffer at the indicated offset.
The offset argument must be greater than or equal to 0, and less than or equal to the length of this string
buffer.
Parameters:
offset - the offset.
b - a boolean.
Returns: a reference to this StringBuffer object.
Throws:
StringIndexOutOfBoundsException - if the offset is invalid.
See Also: String.valueOf(boolean), insert(int, String), length()







No comments:

Post a Comment