quickfix.field.converter
Class DoubleConverter

java.lang.Object
  extended by quickfix.field.converter.DoubleConverter

public class DoubleConverter
extends java.lang.Object

Converts between a double and a String.


Constructor Summary
DoubleConverter()
           
 
Method Summary
static java.lang.String convert(double d)
          Converts a double to a string with no padding.
static java.lang.String convert(double d, int padding)
          Converts a double to a string with padding.
static double convert(java.lang.String value)
          Convert a String value to a double.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleConverter

public DoubleConverter()
Method Detail

convert

public static java.lang.String convert(double d)
Converts a double to a string with no padding.

Parameters:
d - the double to convert
Returns:
the formatted String representing the double.
See Also:
convert(double, int)

convert

public static java.lang.String convert(double d,
                                       int padding)
Converts a double to a string with padding.

Parameters:
d - the double to convert
padding - the number of zeros to add to end of the formatted double
Returns:
the formatted String representing the double.

convert

public static double convert(java.lang.String value)
                      throws FieldConvertError
Convert a String value to a double.

Parameters:
value - the String value to convert
Returns:
the parsed double
Throws:
FieldConvertError - if the String is not a valid double pattern.