org.databene.commons.converter
Class FormatFormatConverter<S>

java.lang.Object
  extended by org.databene.commons.converter.AbstractConverter<S,T>
      extended by org.databene.commons.converter.FormatBasedConverter<S,java.lang.String>
          extended by org.databene.commons.converter.FormatFormatConverter<S>
All Implemented Interfaces:
java.lang.Cloneable, Converter<S,java.lang.String>, ThreadAware

public class FormatFormatConverter<S>
extends FormatBasedConverter<S,java.lang.String>

Converts an object to a String by using a java.lang.Format object's format() method.

Created: 30.08.2006 19:43:09

Since:
0.1
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.FormatBasedConverter
format
 
Fields inherited from class org.databene.commons.converter.AbstractConverter
sourceType, targetType
 
Constructor Summary
FormatFormatConverter(java.lang.Class<S> sourceType, java.text.Format format, boolean threadSafe)
          Constructor that initializes the format object.
 
Method Summary
 java.lang.String convert(S source)
          Converts an object to a String by using the format's format() method.
 
Methods inherited from class org.databene.commons.converter.FormatBasedConverter
clone, isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.commons.converter.AbstractConverter
getSourceType, getTargetType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatFormatConverter

public FormatFormatConverter(java.lang.Class<S> sourceType,
                             java.text.Format format,
                             boolean threadSafe)
Constructor that initializes the format object.

Parameters:
format - the format object to use.
Method Detail

convert

public java.lang.String convert(S source)
Converts an object to a String by using the format's format() method.

Parameters:
source - the object to convert
Returns:
the converted object
See Also:
Converter


Copyright © 2010. All Rights Reserved.