public class TypeUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
cast(Class<? extends V> clazz,
Object value) |
static Object |
cast(org.dmg.pmml.DataType dataType,
Object value) |
static org.dmg.pmml.DataType |
getCommonDataType(org.dmg.pmml.DataType left,
org.dmg.pmml.DataType right) |
static org.dmg.pmml.DataType |
getConstantDataType(String string) |
static org.dmg.pmml.DataType |
getDataType(Collection<?> values) |
static org.dmg.pmml.DataType |
getDataType(Object value) |
static org.dmg.pmml.OpType |
getOpType(org.dmg.pmml.DataType dataType) |
static Object |
parse(org.dmg.pmml.DataType dataType,
String value) |
static DaysSinceDate |
parseDaysSinceDate(LocalDate epoch,
String value) |
static Object |
parseOrCast(org.dmg.pmml.DataType dataType,
Object value) |
public static Object parseOrCast(org.dmg.pmml.DataType dataType, Object value)
IllegalArgumentException - If the value is a String, and it cannot be parsed to the requested representation.TypeCheckException - If the value is an Object other than String, and it cannot be cast to the requested representation.public static Object parse(org.dmg.pmml.DataType dataType, String value)
IllegalArgumentException - If the String representation of the value cannot be parsed to the requested representation.public static DaysSinceDate parseDaysSinceDate(LocalDate epoch, String value)
public static org.dmg.pmml.DataType getDataType(Object value)
public static org.dmg.pmml.DataType getDataType(Collection<?> values)
public static org.dmg.pmml.DataType getCommonDataType(org.dmg.pmml.DataType left,
org.dmg.pmml.DataType right)
DataType.INTEGER,
DataType.FLOAT,
DataType.DOUBLEpublic static org.dmg.pmml.OpType getOpType(org.dmg.pmml.DataType dataType)
public static Object cast(org.dmg.pmml.DataType dataType, Object value)
TypeCheckException - If the value cannot be cast to the requested representation.public static org.dmg.pmml.DataType getConstantDataType(String string)
Copyright © 2018. All rights reserved.