org.eclipse.ocl
Class AbstractEvaluationEnvironment.AbstractTuple<O,P>

java.lang.Object
  extended by org.eclipse.ocl.AbstractEvaluationEnvironment.AbstractTuple<O,P>
All Implemented Interfaces:
Tuple<O,P>
Enclosing class:
AbstractEvaluationEnvironment<C,O,P,CLS,E>

protected abstract static class AbstractEvaluationEnvironment.AbstractTuple<O,P>
extends java.lang.Object
implements Tuple<O,P>

UML implementation of a tuple value.

Since:
3.2
Author:
Christian W. Damus (cdamus)

Constructor Summary
protected AbstractEvaluationEnvironment.AbstractTuple(TupleType<O,P> type, java.util.Map<P,java.lang.Object> values)
          Initializes me with a map of part values.
 
Method Summary
 boolean equals(java.lang.Object o)
           
protected abstract  java.lang.String getName(P part)
           
 TupleType<O,P> getTupleType()
          Obtains the tuple's type.
 java.lang.Object getValue(P part)
          Queries the value of the specified tuple part.
 java.lang.Object getValue(java.lang.String partName)
          Queries the value of the specified tuple part.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractEvaluationEnvironment.AbstractTuple

protected AbstractEvaluationEnvironment.AbstractTuple(TupleType<O,P> type,
                                                      java.util.Map<P,java.lang.Object> values)
Initializes me with a map of part values.

Parameters:
type - my type
values - my parts
Method Detail

getName

protected abstract java.lang.String getName(P part)

getTupleType

public TupleType<O,P> getTupleType()
Description copied from interface: Tuple
Obtains the tuple's type.

Specified by:
getTupleType in interface Tuple<O,P>
Returns:
its type

getValue

public java.lang.Object getValue(java.lang.String partName)
Description copied from interface: Tuple
Queries the value of the specified tuple part.

Specified by:
getValue in interface Tuple<O,P>
Parameters:
partName - the name of the part
Returns:
the corresponding value

getValue

public java.lang.Object getValue(P part)
Description copied from interface: Tuple
Queries the value of the specified tuple part.

Specified by:
getValue in interface Tuple<O,P>
Parameters:
part - the tuple part (as an attribute)
Returns:
the corresponding value

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object