org.eclipse.ocl.examples.domain.values.impl
Class TupleValueImpl
java.lang.Object
org.eclipse.ocl.examples.domain.values.util.ValuesUtil
org.eclipse.ocl.examples.domain.values.impl.ValueImpl
org.eclipse.ocl.examples.domain.values.impl.TupleValueImpl
- All Implemented Interfaces:
- TupleValue, Value
public class TupleValueImpl
- extends ValueImpl
- implements TupleValue
UML implementation of a tuple value.
- Author:
- Christian W. Damus (cdamus)
- Generated
- NOT
Fields inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil |
EMPTY_BAG, EMPTY_SET, FALSE_VALUE, INTEGER_MAX_VALUE, INTEGER_MIN_VALUE, INVALID_VALUE, LONG_MAX_VALUE, LONG_MIN_VALUE, NULL_STRING, NULL_VALUE, ONE_VALUE, TRUE_VALUE, UNLIMITED_VALUE, ZERO_VALUE |
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value |
INVALID_NAME |
Constructor Summary |
TupleValueImpl(TupleTypeId tupleTypeId,
java.util.Map<? extends TuplePartId,java.lang.Object> values)
Initializes me with a map of part values. |
TupleValueImpl(TupleTypeId tupleTypeId,
java.lang.Object... values)
Convenience constructor to initialize me with a list of values as
required by the Collection::product() operation. |
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.ValueImpl |
asBagValue, asCollectionValue, asDouble, asEcoreObject, asEcoreObject, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asUniqueCollectionValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefined, toString |
Methods inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil |
asBagValue, asBoolean, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asMetaclass, asNavigableObject, asObject, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, bigDecimalValueOf, bigIntegerValueOf, characterValueOf, createBagAccumulatorValue, createBagOfEach, createBagRange, createBagValue, createCollectionAccumulatorValue, createInvalidValue, createObjectValue, createOrderedSetAccumulatorValue, createOrderedSetOfEach, createOrderedSetRange, createOrderedSetValue, createRange, createSequenceAccumulatorValue, createSequenceOfEach, createSequenceRange, createSequenceRange, createSequenceValue, createSetAccumulatorValue, createSetOfEach, createSetRange, createSetValue, createTupleOfEach, createTupleValue, createTupleValue, createTypeValue, getEcoreNumber, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, isBoxed, isCollectionValue, isIntegerNumber, isIntegerValue, isRealNumber, isUnboxed, isUnlimited, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, stringValueOf, throwBooleanInvalidValueException, throwInvalidValueException, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value |
asBagValue, asCollectionValue, asDouble, asEcoreObject, asEcoreObject, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isInvalid, isUndefined, toString |
tupleTypeId
@NonNull
protected final TupleTypeId tupleTypeId
TupleValueImpl
public TupleValueImpl(@NonNull
TupleTypeId tupleTypeId,
@NonNull
java.util.Map<? extends TuplePartId,java.lang.Object> values)
- Initializes me with a map of part values.
- Parameters:
type
- my typevalues
- my parts
TupleValueImpl
public TupleValueImpl(@NonNull
TupleTypeId tupleTypeId,
@NonNull
java.lang.Object... values)
- Convenience constructor to initialize me with a list of values as
required by the Collection::product() operation.
- Parameters:
tupleTypeId
- my typevalue
- my values which are aligned to the tupleTypeId.getParts()
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()
-
- Overrides:
eStaticClass
in class ValueImpl
- Generated
asObject
@NonNull
public java.lang.Object asObject()
- Specified by:
asObject
in interface Value
asTupleValue
@NonNull
public TupleValue asTupleValue()
- Specified by:
asTupleValue
in interface Value
- Overrides:
asTupleValue
in class ValueImpl
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
getTypeId
@NonNull
public TupleTypeId getTypeId()
- Description copied from interface:
TupleValue
- Obtains the tuple's type.
- Specified by:
getTypeId
in interface TupleValue
- Specified by:
getTypeId
in interface Value
- Returns:
- its type
getValue
@Nullable
public java.lang.Object getValue(@NonNull
TuplePartId partId)
- Description copied from interface:
TupleValue
- Queries the value of the specified tuple part.
- Specified by:
getValue
in interface TupleValue
- Returns:
- the corresponding value
getValue
@Nullable
public java.lang.Object getValue(int index)
- Description copied from interface:
TupleValue
- 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.
- Specified by:
getValue
in interface TupleValue
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object