FileDocCategorySizeDatePackage
StringBufferWrapper.javaAPI DocExample8692Mon Apr 03 15:49:28 BST 2000tuning.stringconvert

StringBufferWrapper

public class StringBufferWrapper extends Object
Class to replace StringBuffer for optimized appends.

StringBufferWrapper can be used in a very similar way to StringBuffer, e.g.

StringBufferWrapper s = new StringBufferWrapper();
s.append(567).append(" is ").append(33.5).append('%');
You can access the underlying StringBuffer directly as the instance variable s is public.
see
AppenderHelper

Fields Summary
private static final AppenderHelper
HELPER
public StringBuffer
s
Instance variable holding the underlying StringBuffer.
Constructors Summary
public StringBufferWrapper()
Empty argument constructor creates a new StringBuffer for the internal s instance variable.


              
 

	s = new StringBuffer();
public StringBufferWrapper(StringBuffer buf)
One argument constructor sets the internal s instance variable to the StringBuffer.

param
buf the StringBuffer.

	s = buf;
Methods Summary
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Appendable o, int depth)
Appends the string representation of the Appendable argument to the string buffer. Does so by calling the appendTo method of the Appendable.

param
o the Appendable to be appended.
param
depth the depth with which to display the Appendable.
return
this StringBufferWrapper
see
Appendable

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Boolean o)
Appends the string representation of the Boolean argument to the string buffer.

param
o the Boolean to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Byte o)
Appends the string representation of the Byte argument to the string buffer.

param
o the Byte to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Character o)
Appends the string representation of the Character argument to the string buffer.

param
o the Character to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Double o)
Appends the string representation of the Double argument to the string buffer.

param
o the Double to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Float o)
Appends the string representation of the Float argument to the string buffer.

param
o the Float to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Integer o)
Appends the string representation of the Integer argument to the string buffer.

param
o the Integer to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Long o)
Appends the string representation of the Long argument to the string buffer.

param
o the Long to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Object o)
Appends the string representation of the Object argument to the string buffer. If o is an Appendable, this will delegate the append to the appendTo method. If o has a registered append mapping, then this will delegate the append to the registered AppendConverter object.

param
o the Object to be appended.
return
this StringBufferWrapper
see
Appendable
see
AppendConverter

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Object o, int depth)
Appends the string representation of the Object argument to the string buffer. If o is an Appendable, this will delegate the append to the appendTo method. If o has a registered append mapping, then this will delegate the append to the registered AppendConverter object.

param
o the Object to be appended.
param
depth the depth with which to display the object.
return
this StringBufferWrapper
see
Appendable
see
AppendConverter

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Short o)
Appends the string representation of the Short argument to the string buffer.

param
o the Short to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.String o)
Appends the string representation of the String argument to the string buffer.

param
o the String to be appended.
return
this StringBufferWrapper

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.util.Vector o)
Appends a java.util.Vector to a StringBuffer.

Since Vector is an object containing other objects, the contained objects are also appended to the StringBuffer. These appended objects are also asked to be appended by the AppenderHelper object.

param
o the Vector who's display is to be appended.

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.util.Vector o, int depth)
Appends a java.util.Vector to a StringBuffer.

Since Vector is an object containing other objects, the contained objects are also appended to the StringBuffer. These appended objects are also asked to be appended by the AppenderHelper object.

The depth parameter specifies how deep the contained objects network should be asked to appended to the StringBuffer. A depth of 0 means just use a default representation of the object with no further contained objects asked to rpresent themselves.

param
o the Vector who's display is to be appended.
param
depth depth of display for the Vector.

	HELPER.append(s,o);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(boolean b)
Appends the string representation of the boolean argument to the string buffer.

param
o the boolean to be appended.
return
this StringBufferWrapper

	HELPER.append(s,b);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(char[] c)
Appends the string representation of the char array argument to the string buffer.

param
c the characters to be appended.
return
this StringBufferWrapper

	HELPER.append(s,c);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(char[] c, int offset, int len)
Appends the string representation of a subarray of the char array argument to the string buffer.

param
c the characters to be appended.
param
offset the index of the first character to append.
param
len the number of characters to append.
return
this StringBufferWrapper

	HELPER.append(s,c,offset,len);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(char c)
Appends the character to the string buffer.

param
c the character to be appended.
return
this StringBufferWrapper
see
StringBuffer#append(char)

	HELPER.append(s,c);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(double d)
Appends the string representation of the double argument to the string buffer.

param
d the double to be appended.
return
this StringBufferWrapper
see
StringBuffer#append(double)

	HELPER.append(s,d);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(float d)
Appends the string representation of the float argument to the string buffer.

param
d the float to be appended.
return
this StringBufferWrapper
see
StringBuffer#append(float)

	HELPER.append(s,d);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(long i)
Appends the string representation of the long argument to the string buffer.

param
i the long to be appended.
return
this StringBufferWrapper
see
StringBuffer#append(long)

	HELPER.append(s,i);
	return this;
public tuning.stringconvert.StringBufferWrapperappend(java.lang.Appendable o)
Appends the string representation of the Appendable argument to the string buffer. Does so by calling the appendTo method of the Appendable.

param
o the Appendable to be appended.
return
this StringBufferWrapper
see
Appendable

	HELPER.append(s,o);
	return this;