org.apache.commons.convert
Class NumberConverters.GenericNumberToLong<N extends Number>

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<N,Long>
      extended by org.apache.commons.convert.NumberConverters.GenericNumberToLong<N>
All Implemented Interfaces:
Converter<N,Long>, ConverterLoader
Enclosing class:
NumberConverters

public static class NumberConverters.GenericNumberToLong<N extends Number>
extends AbstractConverter<N,Long>

An object that converts a Number to a Long.


Constructor Summary
NumberConverters.GenericNumberToLong(Class<N> sourceClass)
           
 
Method Summary
 Long convert(N obj)
          Converts obj to T.
 
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

NumberConverters.GenericNumberToLong

public NumberConverters.GenericNumberToLong(Class<N> sourceClass)
Method Detail

convert

public Long convert(N obj)
             throws ConversionException
Description copied from interface: Converter
Converts obj to T.

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


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