public final class OrdinalValue extends Object implements OrderedValue, Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ValueVisitor valueVisitor)
Performs some processing on a value.
|
OrdinalValueBuilder |
asBuilder() |
ValueComparator |
compare(Value o)
Compares this value and another according to the defined order, or
checks this number value for membership in a value list.
|
boolean |
equals(Object obj) |
String |
getFormatted()
Returns a string representing this value for display purposes.
|
int |
getIndex() |
ValueType |
getType()
Returns this object's type, guaranteed not
null. |
String |
getValue()
Returns the value.
|
int |
hashCode() |
OrdinalValue |
replace()
Returns a value from a cache that is equal to this one, if such a value
exists.
|
String |
toString() |
public OrdinalValue replace()
Valuepublic String getFormatted()
ValuegetFormatted in interface ValueString. Guaranteed not null.public ValueType getType()
Valuenull.public int getIndex()
public ValueComparator compare(Value o)
compare in interface Valueo - a Value.OrdinalValue, returns
ValueComparator.GREATER_THAN,
ValueComparator.LESS_THAN or ValueComparator.EQUAL_TO
depending on whether this value is numerically greater than,
less than or equal to the value provided as argument. If the provided
value is a ValueList, returns
ValueComparator.IN if this object is a member of the list, or
ValueComparator.NOT_IN if not. Otherwise, returns
ValueComparator.UNKNOWN.public void accept(ValueVisitor valueVisitor)
ValueVisitableaccept in interface ValueVisitablepublic OrdinalValueBuilder asBuilder()
asBuilder in interface OrderedValueasBuilder in interface ValueCopyright © 2012–2017 Emory University. All rights reserved.