public interface Value extends Ref<Value>, Comparable<Value>
Logical value representation.
Use getKind() to find out whether or not you may use
methods like toIntegerValue() and others by mask: to*Value()
If you call a method of any conversion ( to*Value() ) when Kind does not approve it, then you always should get UnsupportedOperationException. Those methods may return other object, such as obj == obj.toIntegerValue() is not always true or false.
By default Object.equals(Object) and Object.hashCode() must be used if you want to check exact instance.
When logical comparison is required, you must always refer to methods such as: isEqualTo(Value)
and Comparable.compareTo(Object)
| Modifier and Type | Interface and Description |
|---|---|
static class |
Value.Kind |
| Modifier and Type | Method and Description |
|---|---|
Value.Kind |
getKind()
Kind of value, used for logical separation between implementations
|
default boolean |
isEqualTo(Value value)
Returns true if value is logically equal to this.
|
default Value |
resolve(Scope scope) |
default BooleanValue |
toBooleanValue() |
default ByteArrayValue |
toByteArrayValue() |
default DateValue |
toDateValue() |
default IntegerValue |
toIntegerValue() |
default NamedValue |
toNamedValue() |
default NullValue |
toNullValue() |
default ObjectIdentifierValue |
toObjectIdentifierValue() |
default ObjectValue |
toObjectValue() |
default OpenTypeValue |
toOpenTypeValue() |
default RealValue |
toRealValue() |
default StringValue |
toStringValue() |
default ValueCollection |
toValueCollection() |
compareTo@NotNull Value.Kind getKind()
default boolean isEqualTo(Value value)
value - the value to comparedefault BooleanValue toBooleanValue()
default IntegerValue toIntegerValue()
default RealValue toRealValue()
default NullValue toNullValue()
default NamedValue toNamedValue()
default ValueCollection toValueCollection()
default StringValue toStringValue()
default DateValue toDateValue()
default ByteArrayValue toByteArrayValue()
default ObjectValue toObjectValue()
default ObjectIdentifierValue toObjectIdentifierValue()
default OpenTypeValue toOpenTypeValue()
default Value resolve(Scope scope) throws ResolutionException
resolve in interface Ref<Value>ResolutionExceptionCopyright © 2017. All rights reserved.