Class IntegerConverter

java.lang.Object
org.incenp.linkml.core.ScalarConverterBase
org.incenp.linkml.core.IntegerConverter
All Implemented Interfaces:
IConverter

public class IntegerConverter extends ScalarConverterBase
Converts raw objects into integer values.

This supports LinkML’s integer type.

  • Constructor Details

    • IntegerConverter

      public IntegerConverter()
  • Method Details

    • getType

      public Class<?> getType()
      Description copied from interface: IConverter
      Gets 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

      protected Object convertImpl(Object raw, ConverterContext ctx) throws LinkMLRuntimeException
      Description copied from class: ScalarConverterBase
      Performs the actual type conversion.
      Specified by:
      convertImpl in class ScalarConverterBase
      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.