public abstract class FieldValue extends Object implements Comparable<FieldValue>, 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() |
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) |
int |
compareTo(FieldValue that) |
int |
compareTo(HasParsedValue<?> hasParsedValue) |
int |
compareTo(org.dmg.pmml.HasValue<?> hasValue)
Calculates the order between this value and the reference value.
|
int |
compareToString(String string) |
int |
compareToValue(FieldValue value)
A value-safe replacement for
compareTo(FieldValue)
|
boolean |
equals(HasParsedValue<?> hasParsedValue) |
boolean |
equals(org.dmg.pmml.HasValue<?> hasValue)
Checks if this value is equal to the reference value.
|
boolean |
equals(Object object) |
boolean |
equalsString(String string) |
boolean |
equalsValue(FieldValue value)
A value-safe replacement for
equals(Object). |
org.dmg.pmml.DataType |
getDataType() |
<V> V |
getMapping(HasParsedValueMapping<V> hasParsedValueMapping) |
abstract org.dmg.pmml.OpType |
getOpType() |
Object |
getValue() |
int |
hashCode() |
int |
indexIn(Iterable<FieldValue> values) |
boolean |
isIn(HasParsedValueSet<?> hasParsedValueSet) |
boolean |
isIn(org.dmg.pmml.HasValueSet<?> hasValueSet)
Checks if this value is contained in the set of reference values.
|
String |
toString() |
public abstract org.dmg.pmml.OpType getOpType()
public boolean equals(org.dmg.pmml.HasValue<?> hasValue)
Checks if this value is equal to the reference value.
public boolean equals(HasParsedValue<?> hasParsedValue)
public boolean isIn(org.dmg.pmml.HasValueSet<?> hasValueSet)
Checks if this value is contained in the set of reference values.
public boolean isIn(HasParsedValueSet<?> hasParsedValueSet)
public int compareTo(org.dmg.pmml.HasValue<?> hasValue)
Calculates the order between this value and the reference value.
public int compareTo(HasParsedValue<?> hasParsedValue)
public boolean equalsString(String string)
public boolean equalsValue(FieldValue value)
A value-safe replacement for equals(Object).
public int indexIn(Iterable<FieldValue> values)
public int compareToString(String string)
public int compareToValue(FieldValue value)
A value-safe replacement for compareTo(FieldValue)
public <V> V getMapping(HasParsedValueMapping<V> hasParsedValueMapping)
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)
public int compareTo(FieldValue that)
compareTo in interface Comparable<FieldValue>public org.dmg.pmml.DataType getDataType()
public Object getValue()
Copyright © 2018. All rights reserved.