Class PmConverterSerializeableBase<T extends>

  extended by<T>
Type Parameters:
T - Type of the value to convert.
All Implemented Interfaces:
Direct Known Subclasses:
PmConverterBoolean, PmConverterDate, PmConverterNumber, PmConverterString

public abstract class PmConverterSerializeableBase<T extends>
extends java.lang.Object
implements PmAttr.Converter<T>

Base class for converters that handle Serializable values.

Provides simple base implementations for some PmAttr.Converter methods.

olaf boede

Constructor Summary
Method Summary
 T serializeableToValue(PmAttr<?> pmAttr, s)
          Casts the given value to T. valueToSerializable(PmAttr<?> pmAttr, T v)
          Passes the given value object through.
 java.lang.String valueToString(PmAttr<?> pmAttr, T v)
          Just calls the Object.toString() method of the given value.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface

Constructor Detail


public PmConverterSerializeableBase()
Method Detail


public java.lang.String valueToString(PmAttr<?> pmAttr,
                                      T v)
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<T extends>


public valueToSerializable(PmAttr<?> pmAttr,
                                                T v)
Passes the given value object through.

Specified by:
valueToSerializable in interface PmAttr.Converter<T extends>


public T serializeableToValue(PmAttr<?> pmAttr,
Casts the given value to T.

Specified by:
serializeableToValue in interface PmAttr.Converter<T extends>