|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Value
A value support wrapping/boxing a value whose Java implementation does not comply with OCL semantics, primarily that equal values return true from Object.equals(Object) but also for variant metamodel elements.
A boxed value is not needed for Boolean and String that are well-behaved.
A boxed value is needed for Integer and Double, since in OCL 4 is equal to 4.0 and since multiple implementation classes exist to support growth between unlimited numeric ranges.
A boxed value is needed for EnumerationLiterals since distinct Pivot, Ecore, UML variants may exist.
A boxed value is needed for types since distinct Pivot, Ecore, UML variants may exist.
A boxed value is useful/needed for collections to provide OCL polymorphism.
A boxed value is not needed for the large number of ordinary EObjects not in the above list.
asXXX returns a non-null XXX if self is convertible to an XXX and is not NullValue/InvalidValue throws an InvalidValueException for a NullValue/InvalidValue. A Value object may be converted if the conversion to XXX is exact and type conformant.
isXXX returns an XXX-related value if self is an XXX and is not a NullValue/InvalidValue, returns null otherwise.
Field Summary | |
---|---|
static java.lang.String |
INVALID_NAME
|
Method Summary | |
---|---|
BagValue |
asBagValue()
|
CollectionValue |
asCollectionValue()
|
java.lang.Double |
asDouble()
|
java.lang.Object |
asEcoreObject()
Deprecated. Use IdResolver.unboxedValueOf. |
java.lang.Object |
asEcoreObject(IdResolver idResolver)
|
DomainElement |
asElement()
|
java.lang.Integer |
asInteger()
|
IntegerValue |
asIntegerValue()
|
org.eclipse.emf.ecore.EObject |
asNavigableObject()
|
java.lang.Object |
asObject()
|
ObjectValue |
asObjectValue()
|
OrderedCollectionValue |
asOrderedCollectionValue()
|
OrderedSetValue |
asOrderedSetValue()
|
RealValue |
asRealValue()
|
SequenceValue |
asSequenceValue()
|
SetValue |
asSetValue()
|
TupleValue |
asTupleValue()
|
UniqueCollectionValue |
asUniqueCollectionValue()
|
Value |
asUnlimitedNaturalValue()
|
TypeId |
getTypeId()
Return the type of this value determined from its construction context. |
boolean |
isInvalid()
|
boolean |
isUndefined()
|
void |
toString(java.lang.StringBuilder s,
int sizeLimit)
|
Field Detail |
---|
static final java.lang.String INVALID_NAME
Method Detail |
---|
@NonNull BagValue asBagValue()
@NonNull CollectionValue asCollectionValue()
@NonNull java.lang.Double asDouble()
@Deprecated java.lang.Object asEcoreObject()
An thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things
java.lang.Object asEcoreObject(@NonNull IdResolver idResolver)
DomainElement asElement()
@NonNull java.lang.Integer asInteger()
@NonNull IntegerValue asIntegerValue()
@NonNull org.eclipse.emf.ecore.EObject asNavigableObject()
@NonNull java.lang.Object asObject()
@NonNull ObjectValue asObjectValue()
@NonNull OrderedCollectionValue asOrderedCollectionValue()
@NonNull OrderedSetValue asOrderedSetValue()
@NonNull RealValue asRealValue()
@NonNull SequenceValue asSequenceValue()
@NonNull SetValue asSetValue()
@NonNull TupleValue asTupleValue()
@NonNull UniqueCollectionValue asUniqueCollectionValue()
@NonNull Value asUnlimitedNaturalValue()
@NonNull TypeId getTypeId()
boolean isInvalid()
boolean isUndefined()
void toString(@NonNull java.lang.StringBuilder s, int sizeLimit)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |