public interface Value
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.
Modifier and Type | Field and Description |
---|---|
static String |
INVALID_NAME |
static final String INVALID_NAME
BagValue asBagValue()
CollectionValue asCollectionValue()
Double asDouble()
Object asEcoreObject(IdResolver idResolver, Class<?> instanceClass)
A thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things, List<?> for collections
Element asElement()
Integer asInteger()
IntegerValue asIntegerValue()
MapValue asMapValue()
EObject asNavigableObject()
Object asObject()
ObjectValue asObjectValue()
OrderedCollectionValue asOrderedCollectionValue()
OrderedSetValue asOrderedSetValue()
RealValue asRealValue()
SequenceValue asSequenceValue()
SetValue asSetValue()
TupleValue asTupleValue()
Object asUnboxedObject(IdResolver idResolver)
A thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things, Bag/Set/OrderedSet/List for collections
UniqueCollectionValue asUniqueCollectionValue()
UnlimitedNaturalValue asUnlimitedNaturalValue()
TypeId getTypeId()
boolean isInvalid()
boolean isUndefined()
void toString(StringBuilder s, int sizeLimit)
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.