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() |
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() |
Integer |
asInteger() |
LocalDate |
asLocalDate() |
LocalDateTime |
asLocalDateTime() |
LocalTime |
asLocalTime() |
Number |
asNumber() |
String |
asString() |
ZonedDateTime |
asZonedDateTime(ZoneId zoneId) |
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.DataType dataType,
org.dmg.pmml.OpType opType,
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 LocalDateTime asLocalDateTime()
public LocalDate asLocalDate()
public LocalTime asLocalTime()
public ZonedDateTime asZonedDateTime(ZoneId zoneId)
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.DataType dataType, org.dmg.pmml.OpType opType, Object value)
public static FieldValue create(TypeInfo typeInfo, Object value)
Copyright © 2020. All rights reserved.