org.databene.commons.converter
Class ParseFormatConverter<T>
java.lang.Object
org.databene.commons.converter.AbstractConverter<S,T>
org.databene.commons.converter.FormatBasedConverter<java.lang.String,T>
org.databene.commons.converter.ParseFormatConverter<T>
- All Implemented Interfaces:
- java.lang.Cloneable, Converter<java.lang.String,T>, ThreadAware
public class ParseFormatConverter<T>
- extends FormatBasedConverter<java.lang.String,T>
Converts a String to an object by using a java.lang.Format object's format() method.
Created: 30.08.2006 19:48:09
- Since:
- 0.1
- Author:
- Volker Bergmann
|
Constructor Summary |
ParseFormatConverter(java.lang.Class<T> targetType,
java.text.Format format,
boolean threadSafe)
|
|
Method Summary |
T |
convert(java.lang.String source)
Converts an object to a String by using the format's format() method. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParseFormatConverter
public ParseFormatConverter(java.lang.Class<T> targetType,
java.text.Format format,
boolean threadSafe)
convert
public T convert(java.lang.String source)
throws ConversionException
- Converts an object to a String by using the format's format() method.
- Parameters:
source - the object to convert
- Returns:
- the converted object
- Throws:
ConversionException - if the conversion fails
Copyright © 2010. All Rights Reserved.