Dresden OCL Toolkit

tudresden.ocl.lib
Class OclUnsortedCollection

java.lang.Object
  extended bytudresden.ocl.lib.OclCollection
      extended bytudresden.ocl.lib.OclUnsortedCollection
All Implemented Interfaces:
Cloneable, OclRoot, OclSizable
Direct Known Subclasses:
OclBag, OclSet

public abstract class OclUnsortedCollection
extends OclCollection

This class is not defined in the OCL specification. It is necessary since the operation intersection is defined for both Set and Bag, but not for Sequence.

Author:
Frank Finger

Field Summary
 
Fields inherited from class tudresden.ocl.lib.OclCollection
collection, STRICT_VALUE_TYPES
 
Constructor Summary
protected OclUnsortedCollection(Collection c)
           
protected OclUnsortedCollection(int dummy, String reason)
          constructor for undefined OCL collection
 
Method Summary
 OclRoot getFeature(String name)
          If a feature of a collection is queried then this is interpreted to be the shorthand for collect (e.g.
abstract  OclUnsortedCollection intersection(OclBag coll)
          The OCL types Bag and Set have this operation defined.
abstract  OclSet intersection(OclSet coll)
          The OCL types Bag and Set have this operation defined.
 
Methods inherited from class tudresden.ocl.lib.OclCollection
asBag, asSequence, asSet, becomeUndefined, collect, collectToList, count, equals, excludes, excluding, exists, forAll, getFeatureAsCollection, getIterator, getUndefinedReason, includes, includesAll, including, isEmpty, isEqualTo, isNotEqualTo, isUndefined, isUnique, iterate, notEmpty, reject, select, selectToList, setToInclude, setToRange, size, sortedBy, sum, toString, union
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OclUnsortedCollection

protected OclUnsortedCollection(Collection c)

OclUnsortedCollection

protected OclUnsortedCollection(int dummy,
                                String reason)
constructor for undefined OCL collection

Method Detail

getFeature

public OclRoot getFeature(String name)
Description copied from class: OclCollection
If a feature of a collection is queried then this is interpreted to be the shorthand for collect (e.g. employee.name as short for employee.collect(name)). Therefore, this method is implemented to call collect appropriately.

Specified by:
getFeature in interface OclRoot
Specified by:
getFeature in class OclCollection
Returns:
an OclBag according to the shorthand notation for collect
See Also:
OclCollection.getFeature(String name)

intersection

public abstract OclUnsortedCollection intersection(OclBag coll)
The OCL types Bag and Set have this operation defined.

Returns:
the intersection of this collection and the OclBag given as argument

intersection

public abstract OclSet intersection(OclSet coll)
The OCL types Bag and Set have this operation defined.

Returns:
the intersection of this collection and the OclSet given as

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.