|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.SimpleStringBuffer
public final class SimpleStringBuffer
Simple version of StringBuffer without synchronized methods and with no ability to grow beyond its initial capacity. It can therefore be used when you know the result length or a definite upper bound.
It also has a different, and much smaller, set of methods, Note that the append methods do not return the buffer, and that there is a method for appending a substring.
Constructor Summary | |
---|---|
SimpleStringBuffer(int capacity)
Creates an empty buffer with the indicated capacity. |
Method Summary | |
---|---|
void |
append(char c)
Appends a single character. |
void |
append(java.lang.String s)
Appends all the characters in a String. |
void |
append(java.lang.String s,
int beginIndex,
int endIndex)
Appends a substring. |
void |
appendCapitalized(java.lang.String s)
Appends the string with its first character converted to upper case. |
void |
appendUncapitalized(java.lang.String s)
Appends the string with its first character converted to lower case. |
int |
length()
Returns the number of characters currently in the buffer. |
java.lang.String |
toString()
Returns a String containing all the characters that have so far been added to the buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleStringBuffer(int capacity)
Method Detail |
---|
public int length()
public void append(java.lang.String s)
public void append(java.lang.String s, int beginIndex, int endIndex)
public void appendCapitalized(java.lang.String s)
public void appendUncapitalized(java.lang.String s)
public void append(char c)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |