org.eclipse.ocl.examples.domain.values.impl
Class TupleValueImpl
java.lang.Object
org.eclipse.ocl.examples.domain.values.impl.AbstractValue
org.eclipse.ocl.examples.domain.values.impl.TupleValueImpl
- All Implemented Interfaces:
- TupleValue, Value
public class TupleValueImpl
- extends AbstractValue
- implements TupleValue
UML implementation of a tuple value.
- Author:
- Christian W. Damus (cdamus)
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value |
INVALID_NAME |
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.AbstractValue |
asBagValue, asBoolean, asBooleanValue, asCollectionValue, asDouble, asEcoreObject, asElement, asElementValue, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asStringValue, asTypeValue, asUniqueCollectionValue, getActualType, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toIteratorValue, toRealValue, 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, asBoolean, asBooleanValue, asCollectionValue, asDouble, asEcoreObject, asElement, asElementValue, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asStringValue, asTypeValue, asUniqueCollectionValue, getActualType, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toIteratorValue, toRealValue, toString |
type
protected final DomainTupleType type
TupleValueImpl
public TupleValueImpl(ValueFactory valueFactory,
DomainTupleType type,
java.util.Map<? extends DomainTypedElement,Value> values)
- Initializes me with a map of part values.
- Parameters:
type
- my typevalues
- my parts
TupleValueImpl
public TupleValueImpl(ValueFactory valueFactory,
DomainTupleType type,
Value firstValue,
Value secondValue)
- Convenience constructor to initialize me with a pair of part values as
required by the Collection::product() operation.
- Parameters:
type
- my typefirstValue
- my first valuesecondValue
- my second value
asObject
public java.lang.Object asObject()
- Specified by:
asObject
in interface Value
asValidValue
public Value asValidValue()
- Specified by:
asValidValue
in interface Value
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
getType
public DomainTupleType getType()
- Description copied from interface:
TupleValue
- Obtains the tuple's type.
- Specified by:
getType
in interface TupleValue
- Specified by:
getType
in interface Value
- Returns:
- its type
getValue
public Value getValue(java.lang.String partName)
- Description copied from interface:
TupleValue
- Queries the value of the specified tuple part.
- Specified by:
getValue
in interface TupleValue
- Parameters:
partName
- the name of the part
- Returns:
- the corresponding value
getValue
public Value getValue(DomainTypedElement part)
- Description copied from interface:
TupleValue
- Queries the value of the specified tuple part.
- Specified by:
getValue
in interface TupleValue
- Parameters:
part
- the tuple part (as an attribute)
- Returns:
- the corresponding value
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object