org.eclipse.ocl.examples.domain.values
Interface TupleValue

All Superinterfaces:
Value
All Known Subinterfaces:
InvalidValue, NullValue
All Known Implementing Classes:
EvaluationHaltedException, InvalidValueException, NullValueImpl, TupleValueImpl, UndefinedValueImpl, VMException, VMInterruptedExecutionException, VMRuntimeException, VMStackOverFlowError

public interface TupleValue
extends Value

Interface of a tuple instance value. OCL expressions resulting in tuples yield instances of this interface.

Author:
Christian W. Damus (cdamus)

Field Summary
 
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value
INVALID_NAME
 
Method Summary
 TupleTypeId getTypeId()
          Obtains the tuple's type.
 java.lang.Object getValue(int index)
          Queries the value of the specified tuple part at 0-based index corresponding to the position of the required part-name in the alphabetically sorted list of all part-names.
 java.lang.Object getValue(TuplePartId partId)
          Queries the value of the specified tuple part.
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asBagValue, asCollectionValue, asDouble, asEcoreObject, asEcoreObject, asElement, asInteger, asIntegerValue, asNavigableObject, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isInvalid, isUndefined, toString
 

Method Detail

getTypeId

@NonNull
TupleTypeId getTypeId()
Obtains the tuple's type.

Specified by:
getTypeId in interface Value
Returns:
its type
Generated
NOT

getValue

@Nullable
java.lang.Object getValue(@NonNull
                                   TuplePartId partId)
Queries the value of the specified tuple part.

Parameters:
part - the tuple part (as an attribute)
Returns:
the corresponding value
Throws:
InvalidValueException
Generated
NOT

getValue

@Nullable
java.lang.Object getValue(int index)
Queries the value of the specified tuple part at 0-based index corresponding to the position of the required part-name in the alphabetically sorted list of all part-names.