org.databene.commons.converter
Class Long2DateConverter
java.lang.Object
org.databene.commons.converter.AbstractConverter<S,T>
org.databene.commons.converter.ThreadSafeConverter<java.lang.Long,java.util.Date>
org.databene.commons.converter.Long2DateConverter
- All Implemented Interfaces:
- java.lang.Cloneable, Converter<java.lang.Long,java.util.Date>, ThreadAware
public class Long2DateConverter
- extends ThreadSafeConverter<java.lang.Long,java.util.Date>
Interprets Long values as milliseconds since 1970-01-01 and
converts them to Date objects.
Created: 26.02.2010 08:19:48
- Since:
- 0.5.0
- Author:
- Volker Bergmann
|
Method Summary |
java.util.Date |
convert(java.lang.Long target)
Concerts an object of type S to an object of type T |
java.lang.Class<java.util.Date> |
getTargetType()
|
java.util.TimeZone |
getTimeZone()
|
void |
setTimeZone(java.util.TimeZone timeZone)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Long2DateConverter
public Long2DateConverter()
Long2DateConverter
public Long2DateConverter(java.util.TimeZone timeZone)
getTimeZone
public java.util.TimeZone getTimeZone()
setTimeZone
public void setTimeZone(java.util.TimeZone timeZone)
getTargetType
public java.lang.Class<java.util.Date> getTargetType()
- Specified by:
getTargetType in interface Converter<java.lang.Long,java.util.Date>- Overrides:
getTargetType in class AbstractConverter<java.lang.Long,java.util.Date>
convert
public java.util.Date convert(java.lang.Long target)
throws ConversionException
- Description copied from interface:
Converter
- Concerts an object of type S to an object of type T
- Parameters:
target - the object to convert
- Returns:
- the converted object
- Throws:
ConversionException - if the conversion fails
Copyright © 2010. All Rights Reserved.