public class DefaultRealToStringConverter extends Object implements SVGDocumentBuilderConfigurator.RealToStringConverter
float and double
values to String in a default manner.| Modifier | Constructor and Description |
|---|---|
protected |
DefaultRealToStringConverter()
Builds a
DefaultRealToStringConverter instance. |
| Modifier and Type | Method and Description |
|---|---|
String |
doubleToString(double value)
Translates a
double to a String using the
Double.toString method if there are some decimals and
Integer.toString otherwise. |
String |
floatToString(float value)
Translates a
float to a String using the
Float.toString method if there are some decimals and
Integer.toString otherwise. |
static DefaultRealToStringConverter |
getInstance()
Returns a single instance of
DefaultRealToStringConverter. |
protected DefaultRealToStringConverter()
DefaultRealToStringConverter instance.public static DefaultRealToStringConverter getInstance()
DefaultRealToStringConverter.public String floatToString(float value)
float to a String using the
Float.toString method if there are some decimals and
Integer.toString otherwise.floatToString in interface SVGDocumentBuilderConfigurator.RealToStringConvertervalue - The value to be translated.public String doubleToString(double value)
double to a String using the
Double.toString method if there are some decimals and
Integer.toString otherwise.doubleToString in interface SVGDocumentBuilderConfigurator.RealToStringConvertervalue - The value to be translated.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.