public abstract class FieldValue extends Object implements TypeInfo, Serializable
A field value representation that meets the requirements of PMML type system.
Type information has two components to it:Operational type. Determines supported type equality and type comparison operations.Data type. Determines supported type conversions.
A field value is created after a field.
It may be later refined by transformations and functions.
FieldValueUtil,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
Boolean |
asBoolean() |
Collection<?> |
asCollection() |
org.jpmml.model.temporals.Date |
asDate() |
org.jpmml.model.temporals.DateTime |
asDateTime() |
Double |
asDouble()
Getting the value of a field as
Double:
FieldValue value = ...;
Double result = value.asDouble();
Getting the value of a field as double:
FieldValue value = ...;
double result = (value.asNumber()).doubleValue();
|
Float |
asFloat() |
org.jpmml.model.temporals.Instant<?> |
asInstant() |
Integer |
asInteger() |
Number |
asNumber() |
String |
asString() |
org.jpmml.model.temporals.Time |
asTime() |
FieldValue |
cast(org.dmg.pmml.HasType<?> hasType) |
FieldValue |
cast(TypeInfo typeInfo) |
int |
compareTo(org.dmg.pmml.HasValue<?> hasValue)
Calculates the order between this value and the reference value.
|
abstract int |
compareToValue(FieldValue value) |
abstract int |
compareToValue(Object value) |
static FieldValue |
create(org.dmg.pmml.OpType opType,
org.dmg.pmml.DataType dataType,
Object value) |
static FieldValue |
create(TypeInfo typeInfo,
Object value) |
boolean |
equals(org.dmg.pmml.HasValue<?> hasValue)
Checks if this value is equal to the reference value.
|
boolean |
equals(Object object) |
boolean |
equalsValue(FieldValue value) |
boolean |
equalsValue(Object value) |
org.dmg.pmml.DataType |
getDataType() |
Object |
getValue() |
int |
hashCode() |
boolean |
isIn(Collection<FieldValue> values) |
boolean |
isIn(org.dmg.pmml.HasValueSet<?> hasValueSet)
Checks if this value is contained in the set of reference values.
|
abstract boolean |
isValid() |
String |
toString() |
protected org.jpmml.model.ToStringHelper |
toStringHelper() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOpType, getOrderingpublic abstract boolean isValid()
public abstract int compareToValue(Object value)
public abstract int compareToValue(FieldValue value)
public FieldValue cast(org.dmg.pmml.HasType<?> hasType)
public FieldValue cast(TypeInfo typeInfo)
public int compareTo(org.dmg.pmml.HasValue<?> hasValue)
Calculates the order between this value and the reference value.
public boolean equals(org.dmg.pmml.HasValue<?> hasValue)
Checks if this value is equal to the reference value.
public boolean isIn(org.dmg.pmml.HasValueSet<?> hasValueSet)
Checks if this value is contained in the set of reference values.
public boolean isIn(Collection<FieldValue> values)
public boolean equalsValue(Object value)
public boolean equalsValue(FieldValue value)
public Collection<?> asCollection()
public String asString()
public Number asNumber()
public Integer asInteger()
public Float asFloat()
public Double asDouble()
Double:
FieldValue value = ...; Double result = value.asDouble();Getting the value of a field as
double:
FieldValue value = ...; double result = (value.asNumber()).doubleValue();
asNumber()public Boolean asBoolean()
public org.jpmml.model.temporals.Date asDate()
public org.jpmml.model.temporals.Time asTime()
public org.jpmml.model.temporals.DateTime asDateTime()
public org.jpmml.model.temporals.Instant<?> asInstant()
protected org.jpmml.model.ToStringHelper toStringHelper()
public org.dmg.pmml.DataType getDataType()
getDataType in interface TypeInfopublic Object getValue()
public static FieldValue create(org.dmg.pmml.OpType opType, org.dmg.pmml.DataType dataType, Object value)
public static FieldValue create(TypeInfo typeInfo, Object value)
Copyright © 2022. All rights reserved.