Class TypeInference
- java.lang.Object
-
- com.datumbox.framework.common.dataobjects.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeInference.DataTypeInternal DataTypes used by the Framework.
-
Constructor Summary
Constructors Constructor Description TypeInference()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypeInference.DataTypegetDataType(Object v)Detects the DataType of a particular value.static DoubletoDouble(Object v)Converts safely any Number to Double.static IntegertoInteger(Object v)Converts safely any Number to Integer.
-
-
-
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:
-
-