java.lang.Object
org.litebridgedb.convert.converter.AbstractNumberConverter<Integer>
org.litebridgedb.convert.converter.IntegerConverter
- All Implemented Interfaces:
Converter<Integer>,ConverterFunction<Integer>,SqlConverter<Integer>
public class IntegerConverter
extends AbstractNumberConverter<Integer>
implements SqlConverter<Integer>
A converter for
Integer values.
Handles Types.INTEGER.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegerconvertNumber(Number value) Converts aNumberinstance to the target type.protected IntegerconvertString(String value) Parses a string value into the target type.@Nullable 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
-
IntegerConverter
public IntegerConverter()
-
-
Method Details
-
convertNumber
Description copied from class:AbstractNumberConverterConverts aNumberinstance to the target type.- Specified by:
convertNumberin classAbstractNumberConverter<Integer>- 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<Integer>- 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<Integer>- Returns:
int.class
-
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<Integer>- Returns:
- an array containing
Types.INTEGER
-