public interface Value extends ValueVisitable
> 100 for representing laboratory
test results when the result is outside of the reportable range of the test.
PROTEMPA implements a single number type that represents integers and
floating point numbers with preservation of significant digits. Values can
be compared for natural order to any other value regardless of type.
PROTEMPA provides parsers that attempt to pick an appropriate value type
when the contents of the string are of an unknown type. PROTEMPA provides
flexible formatting into strings for display purposes. PROTEMPA's value
system includes a value type for dates and for lists of values. Values
have a special compare(org.protempa.proposition.value.Value) method
for comparing values by natural order. The return type of this method,
a ValueComparator, can return greater-than, less-than, equal-to
or unknown, the latter being for when the values being compared are not
comparable. Most values can be converted into built-in primitives or object
types. Values' types are represented by the ValueType enum.| Modifier and Type | Method and Description |
|---|---|
ValueBuilder |
asBuilder() |
ValueComparator |
compare(Value val)
Returns whether the given value is greater, less than, equal to or not
equal to this value.
|
String |
getFormatted()
Returns a string representing this value for display purposes.
|
ValueType |
getType()
Returns this object's type, guaranteed not
null. |
Value |
replace()
Returns a value from a cache that is equal to this one, if such a value
exists.
|
acceptString getFormatted()
String. Guaranteed not null.ValueComparator compare(Value val)
val - a Value. If null,
ValueComparator.UNKNOWN is returned.Value replace()
Value for which #equals(Value)
is true.ValueBuilder asBuilder()
Copyright © 2012–2016 Emory University. All rights reserved.