java.lang.Object
org.litebridge.convert.converter.BigIntegerConverter
- All Implemented Interfaces:
Converter<BigInteger>,ConverterFunction<BigInteger>,SqlConverter<BigInteger>
A converter for
BigInteger values.-
Field Summary
Fields inherited from interface org.litebridge.convert.converter.Converter
DEFAULT_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable BigIntegerConverts the given value to aBigInteger.intpriority()Returns the priority of this converter.int[]sqlTypes()Returns an array ofTypesinteger codes that this converter is associated with.Class<?> type()Returns the target Java class this converter handles.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridge.convert.converter.Converter
primitiveType
-
Constructor Details
-
BigIntegerConverter
public BigIntegerConverter()
-
-
Method Details
-
convert
Converts the given value to aBigInteger.Supports various numeric types and string representation as fall-back.
- Specified by:
convertin interfaceConverterFunction<BigInteger>- Parameters:
value- the value to convert, may benull- Returns:
- the converted
BigInteger, ornull
-
type
Returns the target Java class this converter handles.- Specified by:
typein interfaceConverter<BigInteger>- Returns:
BigInteger.class
-
sqlTypes
public int[] sqlTypes()Description copied from interface:SqlConverterReturns an array ofTypesinteger codes that this converter is associated with.- Specified by:
sqlTypesin interfaceSqlConverter<BigInteger>- Returns:
- an array of SQL type codes
-
priority
public int priority()Description copied from interface:ConverterReturns the priority of this converter.Converters with lower priority values converters are preferred if there are data type overlaps.
As an example, if there are two converters A and B for type
String, if A has a priority of 1 and B has a priority of 2, then A will be chosen to perform the conversion.- Specified by:
priorityin interfaceConverter<BigInteger>- Returns:
- the priority of this converter
-