public abstract class FieldValue extends java.lang.Object implements TypeInfo, java.io.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 |
|---|---|
java.lang.Boolean |
asBoolean() |
java.util.Collection<?> |
asCollection() |
org.jpmml.model.temporals.Date |
asDate() |
org.jpmml.model.temporals.DateTime |
asDateTime() |
java.lang.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();
|
java.lang.Float |
asFloat() |
org.jpmml.model.temporals.Instant<?> |
asInstant() |
java.lang.Integer |
asInteger() |
java.lang.Number |
asNumber() |
java.lang.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(java.lang.Object value) |
static FieldValue |
create(org.dmg.pmml.OpType opType,
org.dmg.pmml.DataType dataType,
java.lang.Object value) |
static FieldValue |
create(TypeInfo typeInfo,
java.lang.Object value) |
boolean |
equals(org.dmg.pmml.HasValue<?> hasValue)
Checks if this value is equal to the reference value.
|
boolean |
equals(java.lang.Object object) |
boolean |
equalsValue(FieldValue value) |
boolean |
equalsValue(java.lang.Object value) |
org.dmg.pmml.DataType |
getDataType() |
java.lang.Object |
getValue() |
int |
hashCode() |
boolean |
isIn(java.util.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() |
java.lang.String |
toString() |
protected org.jpmml.model.ToStringHelper |
toStringHelper() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOpType, getOrderingpublic abstract boolean isValid()
public abstract int compareToValue(java.lang.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(java.util.Collection<FieldValue> values)
public boolean equalsValue(java.lang.Object value)
public boolean equalsValue(FieldValue value)
public java.util.Collection<?> asCollection()
public java.lang.String asString()
public java.lang.Number asNumber()
public java.lang.Integer asInteger()
public java.lang.Float asFloat()
public java.lang.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 java.lang.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()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected org.jpmml.model.ToStringHelper toStringHelper()
public org.dmg.pmml.DataType getDataType()
getDataType in interface TypeInfopublic java.lang.Object getValue()
public static FieldValue create(org.dmg.pmml.OpType opType, org.dmg.pmml.DataType dataType, java.lang.Object value)
public static FieldValue create(TypeInfo typeInfo, java.lang.Object value)
Copyright © 2025. All Rights Reserved.