java.lang.Object
org.litebridgedb.convert.converter.AbstractNumberConverter<Float>
org.litebridgedb.convert.converter.FloatConverter
- All Implemented Interfaces:
Converter<Float>,ConverterFunction<Float>,SqlConverter<Float>
A converter for
Float values.
Handles Types.REAL.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FloatconvertNumber(Number value) Converts aNumberinstance to the target type.protected FloatconvertString(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
-
FloatConverter
public FloatConverter()
-
-
Method Details
-
convertNumber
Description copied from class:AbstractNumberConverterConverts aNumberinstance to the target type.- Specified by:
convertNumberin classAbstractNumberConverter<Float>- 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<Float>- 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<Float>- Returns:
float.class
-
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<Float>- Returns:
- an array containing
Types.REAL
-