@TestClass(value="org.openscience.cdk.tools.FormatStringBufferTest") public class FormatStringBuffer extends Object
Some features provided by ANSI C-standard conformant printfs are not supported because of language constraints.
Supported conversion specifiers are: 'c', 'd', 'e', 'E', 'f', 'g' (works like 'f'), 'i', 'o', 's', 'x' and 'X'.
Supported conversion flags are: '#', '0', '-', ' ' (a space) and '+'.
Support for conversion flag '*' is under development.
Constructor and Description |
---|
FormatStringBuffer(String format)
Create a new FormatStringBuffer.
|
Modifier and Type | Method and Description |
---|---|
FormatStringBuffer |
format(char ch)
Format a char.
|
FormatStringBuffer |
format(double dbl)
Format a double.
|
FormatStringBuffer |
format(float flt)
Format a float.
|
FormatStringBuffer |
format(int i)
Format a float.
|
FormatStringBuffer |
format(long l)
Format a float.
|
FormatStringBuffer |
format(String str)
Format a String.
|
FormatStringBuffer |
reset()
Reset this FormatStringBuffer with the format string
given in the constructor or last call to reset(String).
|
FormatStringBuffer |
reset(String format)
Reset this FormatStringBuffer.
|
String |
toString()
Get the result of the formatting.
|
public FormatStringBuffer(String format)
format
- the format string.@TestMethod(value="testReset_String") public FormatStringBuffer reset(String format)
format
- the format string.@TestMethod(value="testReset") public FormatStringBuffer reset()
@TestMethod(value="testFormat_char") public FormatStringBuffer format(char ch)
@TestMethod(value="testFormat_floatr") public FormatStringBuffer format(float flt)
@TestMethod(value="testFormat_double") public FormatStringBuffer format(double dbl)
@TestMethod(value="testFormat_int") public FormatStringBuffer format(int i)
@TestMethod(value="testFormat_long") public FormatStringBuffer format(long l)
@TestMethod(value="testFormat_String") public FormatStringBuffer format(String str)
@TestMethod(value="testToString") public String toString()