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