org.pm4j.core.pm.impl.converter
Class PmConverterDouble

java.lang.Object
  extended by org.pm4j.core.pm.impl.converter.PmConverterSerializeableBase<T>
      extended by org.pm4j.core.pm.impl.converter.PmConverterNumber<java.lang.Double>
          extended by org.pm4j.core.pm.impl.converter.PmConverterDouble
All Implemented Interfaces:
PmAttr.Converter<java.lang.Double>

public class PmConverterDouble
extends PmConverterNumber<java.lang.Double>


Field Summary
static PmConverterDouble INSTANCE
           
 
Constructor Summary
PmConverterDouble()
           
 
Method Summary
 java.lang.Double stringToValue(PmAttr<?> pmAttr, java.lang.String s)
           
 java.lang.String valueToString(PmAttr<?> pmAttr, java.lang.Double value)
          Just calls the Object.toString() method of the given value.
 
Methods inherited from class org.pm4j.core.pm.impl.converter.PmConverterNumber
getNumberFormat
 
Methods inherited from class org.pm4j.core.pm.impl.converter.PmConverterSerializeableBase
serializeableToValue, valueToSerializable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final PmConverterDouble INSTANCE
Constructor Detail

PmConverterDouble

public PmConverterDouble()
Method Detail

stringToValue

public java.lang.Double stringToValue(PmAttr<?> pmAttr,
                                      java.lang.String s)
Specified by:
stringToValue in interface PmAttr.Converter<java.lang.Double>
Overrides:
stringToValue in class PmConverterNumber<java.lang.Double>

valueToString

public java.lang.String valueToString(PmAttr<?> pmAttr,
                                      java.lang.Double value)
Description copied from class: PmConverterSerializeableBase
Just calls the Object.toString() method of the given value.

This solution works if the Object.toString() implementation provides the information needed for the PmAttr.Converter.stringToValue(PmAttr, String) method call.

Specified by:
valueToString in interface PmAttr.Converter<java.lang.Double>
Overrides:
valueToString in class PmConverterSerializeableBase<java.lang.Double>