public class TypeUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
cast(java.lang.Class<? extends V> clazz,
java.lang.Object value) |
static java.lang.Object |
cast(org.dmg.pmml.DataType dataType,
java.lang.Object value) |
static boolean |
equals(org.dmg.pmml.DataType dataType,
java.lang.Object value,
java.lang.Object referenceValue) |
static java.lang.String |
format(java.lang.Object value) |
static org.dmg.pmml.DataType |
getCommonDataType(org.dmg.pmml.DataType left,
org.dmg.pmml.DataType right) |
static org.dmg.pmml.DataType |
getConstantDataType(java.lang.Object value) |
static org.dmg.pmml.DataType |
getConstantDataType(java.lang.String value) |
static org.dmg.pmml.DataType |
getDataType(java.util.Collection<?> values) |
static org.dmg.pmml.DataType |
getDataType(java.lang.Object value) |
static org.dmg.pmml.OpType |
getOpType(org.dmg.pmml.DataType dataType) |
static java.lang.Object |
parse(org.dmg.pmml.DataType dataType,
java.lang.String value) |
static java.lang.Object |
parseOrCast(org.dmg.pmml.DataType dataType,
java.lang.Object value) |
public static java.lang.String format(java.lang.Object value)
public static java.lang.Object parseOrCast(org.dmg.pmml.DataType dataType,
java.lang.Object value)
java.lang.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 java.lang.Object parse(org.dmg.pmml.DataType dataType,
java.lang.String value)
java.lang.IllegalArgumentException - If the String representation of the value cannot be parsed to the requested representation.public static boolean equals(org.dmg.pmml.DataType dataType,
java.lang.Object value,
java.lang.Object referenceValue)
public static org.dmg.pmml.DataType getDataType(java.lang.Object value)
public static org.dmg.pmml.DataType getDataType(java.util.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 java.lang.Object cast(org.dmg.pmml.DataType dataType,
java.lang.Object value)
TypeCheckException - If the value cannot be cast to the requested representation.public static <V> V cast(java.lang.Class<? extends V> clazz,
java.lang.Object value)
public static org.dmg.pmml.DataType getConstantDataType(java.lang.Object value)
public static org.dmg.pmml.DataType getConstantDataType(java.lang.String value)
Copyright © 2024. All Rights Reserved.