java.lang.Object
org.litebridgedb.convert.converter.AbstractNumberConverter<Double>
org.litebridgedb.convert.converter.DoubleConverter
- All Implemented Interfaces:
Converter<Double>,ConverterFunction<Double>,SqlConverter<Double>
public class DoubleConverter
extends AbstractNumberConverter<Double>
implements SqlConverter<Double>
A converter for
Double values.
Handles Types.FLOAT and Types.DOUBLE.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DoubleconvertNumber(Number value) Converts aNumberinstance to the target type.protected DoubleconvertString(String value) Parses a string value into the target type.Class<?> Returns the primitive counterpart of the target class.int[]sqlTypes()Returns the SQL types associated with this converter.Class<?> type()Returns the target Java class this converter handles.Methods inherited from class org.litebridgedb.convert.converter.AbstractNumberConverter
convertMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridgedb.convert.converter.ConverterFunction
convert
-
Constructor Details
-
DoubleConverter
public DoubleConverter()
-
-
Method Details
-
convertNumber
Description copied from class:AbstractNumberConverterConverts aNumberinstance to the target type.- Specified by:
convertNumberin classAbstractNumberConverter<Double>- Parameters:
value- the numeric value to convert- Returns:
- the converted value
-
convertString
Description copied from class:AbstractNumberConverterParses a string value into the target type.- Specified by:
convertStringin classAbstractNumberConverter<Double>- Parameters:
value- the string value to parse- Returns:
- the parsed value
-
type
Returns the target Java class this converter handles. -
primitiveType
Returns the primitive counterpart of the target class.- Specified by:
primitiveTypein interfaceConverter<Double>- Returns:
double.class
-
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<Double>- Returns:
- an array containing
Types.FLOATandTypes.DOUBLE
-