com.google.gwt.core.client.impl
Class StringBufferImplAppend

java.lang.Object
  extended by com.google.gwt.core.client.impl.StringBufferImpl
      extended by com.google.gwt.core.client.impl.StringBufferImplAppend

public class StringBufferImplAppend
extends StringBufferImpl

A StringBufferImpl that uses += for appending strings. This appears to be the fastest implementation everywhere except IE, where it's terrible.


Constructor Summary
StringBufferImplAppend()
           
 
Method Summary
 void append(java.lang.Object data, boolean x)
          Append for primitive; the value can be stored and only later converted to a string.
 void append(java.lang.Object data, double x)
          Append for primitive; the value can be stored and only later converted to a string.
 void append(java.lang.Object data, float x)
          Append for primitive; the value can be stored and only later converted to a string.
 void append(java.lang.Object data, int x)
          Append for primitive; the value can be stored and only later converted to a string.
 void append(java.lang.Object data, java.lang.Object x)
          Append for object.
 void append(java.lang.Object data, java.lang.String x)
          Append for a possibly null string object.
 void appendNonNull(java.lang.Object data, java.lang.String x)
          Append for a string that is definitely not null.
 java.lang.Object createData()
          Returns a data holder object for use with subsequent calls.
 int length(java.lang.Object data)
          Returns the current length of the string buffer.
 void replace(java.lang.Object data, int start, int end, java.lang.String toInsert)
          Replaces a segment of the string buffer.
 java.lang.String toString(java.lang.Object data)
          Returns the string buffer as a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringBufferImplAppend

public StringBufferImplAppend()
Method Detail

append

public void append(java.lang.Object data,
                   boolean x)
Description copied from class: StringBufferImpl
Append for primitive; the value can be stored and only later converted to a string.

Specified by:
append in class StringBufferImpl

append

public void append(java.lang.Object data,
                   double x)
Description copied from class: StringBufferImpl
Append for primitive; the value can be stored and only later converted to a string.

Specified by:
append in class StringBufferImpl

append

public void append(java.lang.Object data,
                   float x)
Description copied from class: StringBufferImpl
Append for primitive; the value can be stored and only later converted to a string.

Specified by:
append in class StringBufferImpl

append

public void append(java.lang.Object data,
                   int x)
Description copied from class: StringBufferImpl
Append for primitive; the value can be stored and only later converted to a string.

Specified by:
append in class StringBufferImpl

append

public void append(java.lang.Object data,
                   java.lang.Object x)
Description copied from class: StringBufferImpl
Append for object. It is important to immediately convert the object to a string, because the conversion can give different results if it is deferred.

Specified by:
append in class StringBufferImpl

append

public void append(java.lang.Object data,
                   java.lang.String x)
Description copied from class: StringBufferImpl
Append for a possibly null string object.

Specified by:
append in class StringBufferImpl

appendNonNull

public void appendNonNull(java.lang.Object data,
                          java.lang.String x)
Description copied from class: StringBufferImpl
Append for a string that is definitely not null.

Specified by:
appendNonNull in class StringBufferImpl

createData

public java.lang.Object createData()
Description copied from class: StringBufferImpl
Returns a data holder object for use with subsequent calls.

Specified by:
createData in class StringBufferImpl

length

public int length(java.lang.Object data)
Description copied from class: StringBufferImpl
Returns the current length of the string buffer.

Specified by:
length in class StringBufferImpl

replace

public void replace(java.lang.Object data,
                    int start,
                    int end,
                    java.lang.String toInsert)
Description copied from class: StringBufferImpl
Replaces a segment of the string buffer.

Specified by:
replace in class StringBufferImpl

toString

public java.lang.String toString(java.lang.Object data)
Description copied from class: StringBufferImpl
Returns the string buffer as a String.

Specified by:
toString in class StringBufferImpl