Class TypeInference


  • public class TypeInference
    extends Object
    This class is responsible for inferring the internal DataType of the objects and for converting safely their values to a specified type.
    Author:
    Vasilis Vryniotis
    • Constructor Detail

      • TypeInference

        public TypeInference()
    • Method Detail

      • getDataType

        public static TypeInference.DataType getDataType​(Object v)
        Detects the DataType of a particular value.
        Parameters:
        v -
        Returns:
      • toDouble

        public static Double toDouble​(Object v)
        Converts safely any Number to Double.
        Parameters:
        v -
        Returns:
      • toInteger

        public static Integer toInteger​(Object v)
        Converts safely any Number to Integer.
        Parameters:
        v -
        Returns: