org.apache.commons.convert
Class DateTimeConverters.GenericDateToLong<S extends Date>

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<S,Long>
      extended by org.apache.commons.convert.DateTimeConverters.GenericDateToLong<S>
All Implemented Interfaces:
Converter<S,Long>, ConverterLoader
Enclosing class:
DateTimeConverters

public static class DateTimeConverters.GenericDateToLong<S extends Date>
extends AbstractConverter<S,Long>

An object that converts a java.util.Date (and its subclasses) to a Long.


Constructor Summary
DateTimeConverters.GenericDateToLong(Class<S> source)
           
 
Method Summary
 Long convert(S obj)
          Returns the millisecond value of obj.
 
Methods inherited from class org.apache.commons.convert.AbstractConverter
canConvert, getSourceClass, getTargetClass, loadConverters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeConverters.GenericDateToLong

public DateTimeConverters.GenericDateToLong(Class<S> source)
Method Detail

convert

public Long convert(S obj)
             throws ConversionException
Returns the millisecond value of obj.

Parameters:
obj - The source Object to convert
Returns:
The converted Object
Throws:
ConversionException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.