Methods Summary |
---|
public java.lang.StringBuilder | append(java.lang.CharSequence s, int start, int end)
super.append(s, start, end);
return this;
|
public java.lang.StringBuilder | append(char[] str)
super.append(str);
return this;
|
public java.lang.StringBuilder | append(char[] str, int offset, int len)
super.append(str, offset, len);
return this;
|
public java.lang.StringBuilder | append(boolean b)
super.append(b);
return this;
|
public java.lang.StringBuilder | append(char c)
super.append(c);
return this;
|
public java.lang.StringBuilder | append(int i)
super.append(i);
return this;
|
public java.lang.StringBuilder | append(long lng)
super.append(lng);
return this;
|
public java.lang.StringBuilder | append(float f)
super.append(f);
return this;
|
public java.lang.StringBuilder | append(double d)
super.append(d);
return this;
|
public java.lang.StringBuilder | append(java.lang.Object obj)
return append(String.valueOf(obj));
|
public java.lang.StringBuilder | append(java.lang.String str)
super.append(str);
return this;
|
private java.lang.StringBuilder | append(java.lang.StringBuilder sb)
if (sb == null)
return append("null");
int len = sb.length();
int newcount = count + len;
if (newcount > value.length)
expandCapacity(newcount);
sb.getChars(0, len, value, count);
count = newcount;
return this;
|
public java.lang.StringBuilder | append(java.lang.StringBuffer sb)Appends the specified StringBuffer to this sequence.
The characters of the StringBuffer argument are appended,
in order, to this sequence, increasing the
length of this sequence by the length of the argument.
If sb is null, then the four characters
"null" are appended to this sequence.
Let n be the length of this character sequence just prior to
execution of the append method. Then 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
n; otherwise, it is equal to the character at index k-n
in the argument sb .
super.append(sb);
return this;
|
public java.lang.StringBuilder | append(java.lang.CharSequence s)
if (s == null)
s = "null";
if (s instanceof String)
return this.append((String)s);
if (s instanceof StringBuffer)
return this.append((StringBuffer)s);
if (s instanceof StringBuilder)
return this.append((StringBuilder)s);
return this.append(s, 0, s.length());
|
public java.lang.StringBuilder | appendCodePoint(int codePoint)
super.appendCodePoint(codePoint);
return this;
|
public java.lang.StringBuilder | delete(int start, int end)
super.delete(start, end);
return this;
|
public java.lang.StringBuilder | deleteCharAt(int index)
super.deleteCharAt(index);
return this;
|
public int | indexOf(java.lang.String str)
return indexOf(str, 0);
|
public int | indexOf(java.lang.String str, int fromIndex)
return String.indexOf(value, 0, count,
str.toCharArray(), 0, str.length(), fromIndex);
|
public java.lang.StringBuilder | insert(int index, char[] str, int offset, int len)
super.insert(index, str, offset, len);
return this;
|
public java.lang.StringBuilder | insert(int offset, java.lang.Object obj)
return insert(offset, String.valueOf(obj));
|
public java.lang.StringBuilder | insert(int offset, java.lang.String str)
super.insert(offset, str);
return this;
|
public java.lang.StringBuilder | insert(int offset, char[] str)
super.insert(offset, str);
return this;
|
public java.lang.StringBuilder | insert(int dstOffset, java.lang.CharSequence s)
if (s == null)
s = "null";
if (s instanceof String)
return this.insert(dstOffset, (String)s);
return this.insert(dstOffset, s, 0, s.length());
|
public java.lang.StringBuilder | insert(int dstOffset, java.lang.CharSequence s, int start, int end)
super.insert(dstOffset, s, start, end);
return this;
|
public java.lang.StringBuilder | insert(int offset, boolean b)
super.insert(offset, b);
return this;
|
public java.lang.StringBuilder | insert(int offset, char c)
super.insert(offset, c);
return this;
|
public java.lang.StringBuilder | insert(int offset, int i)
return insert(offset, String.valueOf(i));
|
public java.lang.StringBuilder | insert(int offset, long l)
return insert(offset, String.valueOf(l));
|
public java.lang.StringBuilder | insert(int offset, float f)
return insert(offset, String.valueOf(f));
|
public java.lang.StringBuilder | insert(int offset, double d)
return insert(offset, String.valueOf(d));
|
public int | lastIndexOf(java.lang.String str)
return lastIndexOf(str, count);
|
public int | lastIndexOf(java.lang.String str, int fromIndex)
return String.lastIndexOf(value, 0, count,
str.toCharArray(), 0, str.length(), fromIndex);
|
private void | readObject(java.io.ObjectInputStream s)readObject is called to restore the state of the StringBuffer from
a stream.
s.defaultReadObject();
count = s.readInt();
value = (char[]) s.readObject();
|
public java.lang.StringBuilder | replace(int start, int end, java.lang.String str)
super.replace(start, end, str);
return this;
|
public java.lang.StringBuilder | reverse()
super.reverse();
return this;
|
public java.lang.String | toString()
// Create a copy, don't share the array
return new String(value, 0, count);
|
private void | writeObject(java.io.ObjectOutputStream s)Save the state of the StringBuilder instance to a stream
(that is, serialize it).
s.defaultWriteObject();
s.writeInt(count);
s.writeObject(value);
|