ilog.views.svg
Class DefaultRealToStringConverter

java.lang.Object
  extended by ilog.views.svg.DefaultRealToStringConverter
All Implemented Interfaces:
SVGDocumentBuilderConfigurator.RealToStringConverter

public class DefaultRealToStringConverter
extends Object
implements SVGDocumentBuilderConfigurator.RealToStringConverter

This singleton class translates float and double values to String in a default manner.

Since:
JViews 5.0

Constructor Summary
protected DefaultRealToStringConverter()
          Builds a DefaultRealToStringConverter instance.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRealToStringConverter

protected DefaultRealToStringConverter()
Builds a DefaultRealToStringConverter instance.

Method Detail

getInstance

public static DefaultRealToStringConverter getInstance()
Returns a single instance of DefaultRealToStringConverter.


floatToString

public String floatToString(float value)
Translates a float to a String using the Float.toString method if there are some decimals and Integer.toString otherwise.

Specified by:
floatToString in interface SVGDocumentBuilderConfigurator.RealToStringConverter
Parameters:
value - The value to be translated.

doubleToString

public String doubleToString(double value)
Translates a double to a String using the Double.toString method if there are some decimals and Integer.toString otherwise.

Specified by:
doubleToString in interface SVGDocumentBuilderConfigurator.RealToStringConverter
Parameters:
value - The value to be translated.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.