|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttudresden.ocl.lib.OclContainer
This class is a implementation of OclRoot that is backed by a "contained"
OclRoot object. That contained object can be changed. OclContainer
is
necessary for the iterate
operation on collections: The
accumulator argument is initialized as an instance of OclContainer
and can be updated with every iteration step. The method iterate is
implemented to update the contained value of the OclContainer
every step and return the contained value (NOT the OclContainer) after the
iteration is complete.
OclCollection.iterate(OclIterator iter, OclContainer acc, OclRootEvaluatable eval)
Field Summary | |
private OclRoot |
containedValue
|
Constructor Summary | |
OclContainer(OclRoot o)
create a new OclContainer that contains the OclRoot object
given as argument |
Method Summary | |
OclRoot |
getFeature(String name)
calls getFeature of the contained value |
OclCollection |
getFeatureAsCollection(String name)
Please consult the documentation of OclRoot.getFeatureAsCollection
for a detailed explanation. |
String |
getUndefinedReason()
Returns the reason, why this undefined ocl object has been created. |
OclRoot |
getValue()
returns the contained value; this method is called inside the method iterate of OclCollection to get the
OclRoot that will be returned by that method, and in
(inner) classes implementing OclRootEvaluatable to refer to
the value of the accumulator |
OclBoolean |
isEqualTo(Object o)
two OclContainers are equal if their contained values are equal; usually not the OclContainers themselves should be compared, but their values |
OclBoolean |
isNotEqualTo(Object o)
Returns the negated result of isEqualTo . |
boolean |
isUndefined()
Returns true if this object is the result of an undefined OCL expression. |
protected void |
setValue(OclRoot o)
sets the contained value to the argument; this method is called inside the method iterate of OclCollection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private OclRoot containedValue
Constructor Detail |
public OclContainer(OclRoot o)
OclRoot
object
given as argument
o
- the initial value to be contained by this OclContainerMethod Detail |
public OclBoolean isEqualTo(Object o)
isEqualTo
in interface OclRoot
getValue()
public OclBoolean isNotEqualTo(Object o)
OclRoot
isEqualTo
.
isNotEqualTo
in interface OclRoot
isEqualTo(Object o)
public OclRoot getFeature(String name)
getFeature
of the contained value
getFeature
in interface OclRoot
name
- the name of the queried attributeOclCollection.collect(OclIterator iter, OclRootEvaluatable eval)
public OclCollection getFeatureAsCollection(String name)
OclRoot.getFeatureAsCollection
for a detailed explanation.
getFeatureAsCollection
in interface OclRoot
OclRoot.getFeatureAsCollection(String name)
protected void setValue(OclRoot o)
iterate
of OclCollection
public OclRoot getValue()
iterate
of OclCollection
to get the
OclRoot that will be returned by that method, and in
(inner) classes implementing OclRootEvaluatable
to refer to
the value of the accumulator
public boolean isUndefined()
OclRoot
isUndefined
in interface OclRoot
public final String getUndefinedReason()
OclRoot
getUndefinedReason
in interface OclRoot
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |