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

java.lang.Object
  extended by com.google.gwt.core.client.impl.StringBufferImpl
Direct Known Subclasses:
StringBufferImplAppend, StringBufferImplArrayBase

public abstract class StringBufferImpl
extends java.lang.Object

The interface to defer bound implementations of StringBuilder and StringBuffer.

All of the implementations have been carefully tweaked to get the most inlining possible, so be sure to check with StringBuilderBenchmark whenever these classes are modified.


Constructor Summary
StringBufferImpl()
           
 
Method Summary
abstract  void append(java.lang.Object data, boolean x)
          Append for primitive; the value can be stored and only later converted to a string.
abstract  void append(java.lang.Object data, double x)
          Append for primitive; the value can be stored and only later converted to a string.
abstract  void append(java.lang.Object data, float x)
          Append for primitive; the value can be stored and only later converted to a string.
abstract  void append(java.lang.Object data, int x)
          Append for primitive; the value can be stored and only later converted to a string.
abstract  void append(java.lang.Object data, java.lang.Object x)
          Append for object.
abstract  void append(java.lang.Object data, java.lang.String x)
          Append for a possibly null string object.
abstract  void appendNonNull(java.lang.Object data, java.lang.String x)
          Append for a string that is definitely not null.
abstract  java.lang.Object createData()
          Returns a data holder object for use with subsequent calls.
abstract  int length(java.lang.Object data)
          Returns the current length of the string buffer.
abstract  void replace(java.lang.Object data, int start, int end, java.lang.String toInsert)
          Replaces a segment of the string buffer.
abstract  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

StringBufferImpl

public StringBufferImpl()
Method Detail

append

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


append

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


append

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


append

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


append

public abstract void append(java.lang.Object data,
                            java.lang.Object x)
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.


append

public abstract void append(java.lang.Object data,
                            java.lang.String x)
Append for a possibly null string object.


appendNonNull

public abstract void appendNonNull(java.lang.Object data,
                                   java.lang.String x)
Append for a string that is definitely not null.


createData

public abstract java.lang.Object createData()
Returns a data holder object for use with subsequent calls.


length

public abstract int length(java.lang.Object data)
Returns the current length of the string buffer.


replace

public abstract void replace(java.lang.Object data,
                             int start,
                             int end,
                             java.lang.String toInsert)
Replaces a segment of the string buffer.


toString

public abstract java.lang.String toString(java.lang.Object data)
Returns the string buffer as a String.