|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.util.StringBuilder
public class StringBuilder
A string builder class
+= operator is faster in Firefox and Opera. Array push/join is faster in Internet Explorer
Even with this wrapper, which costs some time, this is faster in Firefox than the alternative Array concat in all browsers (which is in relation to IE’s performance issues only marginal). The IE performance loss caused by this wrapper is not relevant.
So this class seems to be the best compromise to handle string concatenation.
Constructor Summary | |
---|---|
StringBuilder()
|
|
StringBuilder(java.lang.String varargs)
|
Method Summary | |
---|---|
void |
add(java.lang.String varargs)
Append a variable number of string arguments. |
void |
clear()
Resets the contents of the Stringbuilder equivalent to |
java.lang.String |
get()
Returns the contents of the concatenated string |
void |
init()
Initializes the contents of the Stringbuilder equivalent to |
boolean |
isEmpty()
Checks whether the strinb builder instance represents the epty string. |
java.lang.String |
toString_()
Returns the contents of the concatenated string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringBuilder()
public StringBuilder(java.lang.String varargs)
Method Detail |
---|
public void add(java.lang.String varargs)
Append a variable number of string arguments. To only append
one use #addOne
instead.
public void clear()
Resets the contents of the Stringbuilder equivalent to
str = "";
public java.lang.String get()
Returns the contents of the concatenated string
public void init()
Initializes the contents of the Stringbuilder equivalent to
str = "";
public boolean isEmpty()
Checks whether the strinb builder instance represents the epty string.
public java.lang.String toString_()
Returns the contents of the concatenated string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |