Class IntegerConverter
java.lang.Object
org.incenp.linkml.core.converters.ScalarConverterBase
org.incenp.linkml.core.converters.IntegerConverter
- All Implemented Interfaces:
IConverter
Converts raw objects into integer values.
This supports LinkML’s integer type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectconvertImpl(Object raw, ConverterContext ctx) Performs the actual type conversion.Class<?> getType()Gets the type of object that this converter can convert a raw object into.Methods inherited from class ScalarConverterBase
convert, convertForSlot, serialise, serialiseForSlot, toListMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IConverter
getURI
-
Constructor Details
-
IntegerConverter
public IntegerConverter()
-
-
Method Details
-
getType
Description copied from interface:IConverterGets the type of object that this converter can convert a raw object into.- Returns:
- The Java type representing the LinkML object this converter is intended for.
-
convertImpl
Description copied from class:ScalarConverterBasePerforms the actual type conversion.- Specified by:
convertImplin classScalarConverterBase- Parameters:
raw- The raw object to convert. This is guaranteed to be a non-null, non-list, non-dictionary object.- Returns:
- The converted value.
- Throws:
LinkMLRuntimeException- If the converter cannot convert the given value.
-