|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.fastcat.DummyString
public class DummyString
Demonstrate how a new efficient concatenating String constructor would work.
Constructor permits more efficient concatenation than StringBuffer or StringBuilder. It uses no intermediate buffers and no intermediate character copying. It might be used to more efficiently implement the + concatenation operator and StringWriter. Why bother? Webservers do almost nothing but concatenate Strings and garbage collection. I have reported this as an RFE to Sun with ID 1620012. 1.0 2009-09-30 - initial release
Constructor Summary | |
---|---|
DummyString()
Initializes a newly created String object so that it represents
an empty character sequence. |
|
DummyString(java.lang.String... pieces)
concatenating String constructor |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DummyString()
String
object so that it represents
an empty character sequence. Note that use of this constructor is
unnecessary since Strings are immutable.
public DummyString(java.lang.String... pieces)
pieces
- vararg of Strings to be concatenated to create this new String.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |