public final class StringBuffer extends Object
StringBuilder
except for the name.
Any change made to one should be mirrored in the other.Constructor and Description |
---|
StringBuffer() |
StringBuffer(CharSequence s) |
StringBuffer(int ignoredCapacity)
This implementation does not track capacity; using this constructor is
functionally equivalent to using the zero-argument constructor.
|
StringBuffer(String s) |
Modifier and Type | Method and Description |
---|---|
StringBuffer |
append(boolean x) |
StringBuffer |
append(char x) |
StringBuffer |
append(char[] x) |
StringBuffer |
append(char[] x,
int start,
int len) |
StringBuffer |
append(CharSequence x) |
StringBuffer |
append(CharSequence x,
int start,
int end) |
StringBuffer |
append(double x) |
StringBuffer |
append(float x) |
StringBuffer |
append(int x) |
StringBuffer |
append(long x) |
StringBuffer |
append(Object x) |
StringBuffer |
append(String x) |
StringBuffer |
append(StringBuffer x) |
StringBuffer |
appendCodePoint(int x) |
int |
capacity() |
char |
charAt(int index) |
StringBuffer |
delete(int start,
int end) |
StringBuffer |
deleteCharAt(int start) |
void |
ensureCapacity(int ignoredCapacity) |
void |
getChars(int srcStart,
int srcEnd,
char[] dst,
int dstStart) |
int |
indexOf(String x) |
int |
indexOf(String x,
int start) |
StringBuffer |
insert(int index,
boolean x) |
StringBuffer |
insert(int index,
char x) |
StringBuffer |
insert(int index,
char[] x) |
StringBuffer |
insert(int index,
char[] x,
int offset,
int len) |
StringBuffer |
insert(int index,
CharSequence chars) |
StringBuffer |
insert(int index,
CharSequence chars,
int start,
int end) |
StringBuffer |
insert(int index,
double x) |
StringBuffer |
insert(int index,
float x) |
StringBuffer |
insert(int index,
int x) |
StringBuffer |
insert(int index,
long x) |
StringBuffer |
insert(int index,
Object x) |
StringBuffer |
insert(int index,
String x) |
int |
lastIndexOf(String s) |
int |
lastIndexOf(String s,
int start) |
int |
length() |
StringBuffer |
replace(int start,
int end,
String toInsert) |
StringBuffer |
reverse() |
void |
setCharAt(int index,
char x)
Warning! This method is much slower than the JRE implementation.
|
void |
setLength(int newLength) |
CharSequence |
subSequence(int start,
int end) |
String |
substring(int begin) |
String |
substring(int begin,
int end) |
String |
toString() |
void |
trimToSize() |
$isInstance, chars
public StringBuffer()
public StringBuffer(CharSequence s)
public StringBuffer(int ignoredCapacity)
public StringBuffer(String s)
public StringBuffer append(boolean x)
public StringBuffer append(char x)
public StringBuffer append(char[] x)
public StringBuffer append(char[] x, int start, int len)
public StringBuffer append(CharSequence x)
public StringBuffer append(CharSequence x, int start, int end)
public StringBuffer append(double x)
public StringBuffer append(float x)
public StringBuffer append(int x)
public StringBuffer append(long x)
public StringBuffer append(Object x)
public StringBuffer append(String x)
public StringBuffer append(StringBuffer x)
public StringBuffer appendCodePoint(int x)
public StringBuffer delete(int start, int end)
public StringBuffer deleteCharAt(int start)
public StringBuffer insert(int index, boolean x)
public StringBuffer insert(int index, char x)
public StringBuffer insert(int index, char[] x)
public StringBuffer insert(int index, char[] x, int offset, int len)
public StringBuffer insert(int index, CharSequence chars)
public StringBuffer insert(int index, CharSequence chars, int start, int end)
public StringBuffer insert(int index, double x)
public StringBuffer insert(int index, float x)
public StringBuffer insert(int index, int x)
public StringBuffer insert(int index, long x)
public StringBuffer insert(int index, Object x)
public StringBuffer insert(int index, String x)
public StringBuffer replace(int start, int end, String toInsert)
public StringBuffer reverse()
public int length()
length
in interface CharSequence
public void setLength(int newLength)
public int capacity()
public void ensureCapacity(int ignoredCapacity)
public void trimToSize()
public char charAt(int index)
charAt
in interface CharSequence
public void getChars(int srcStart, int srcEnd, char[] dst, int dstStart)
public void setCharAt(int index, char x)
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public String substring(int begin)
public String substring(int begin, int end)
public int indexOf(String x)
public int indexOf(String x, int start)
public int lastIndexOf(String s)
public int lastIndexOf(String s, int start)
public String toString()
toString
in interface CharSequence
toString
in class Object
Copyright © 2018. All rights reserved.