de.tuberlin.cs.cis.ocl.eval.instance
Class SetInstance

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.eval.instance.PredefinedInstance
        |
        +--de.tuberlin.cs.cis.ocl.eval.instance.CollectionInstance
              |
              +--de.tuberlin.cs.cis.ocl.eval.instance.SetInstance
All Implemented Interfaces:
java.lang.Cloneable, Instance, OclCollection, OclSet

public class SetInstance
extends CollectionInstance
implements OclSet

Represents an instance of the OCL type Set.

Author:
fchabar

Constructor Summary
SetInstance(Type elemType, java.util.Set setValue)
          Constructs an instance of the OCL type Set via a Java Set.
 
Method Summary
 OclBag asBag()
           
 OclSequence asSequence()
           
 java.lang.Object clone()
           
 OclBag collect(OclExpression expr)
           
 OclInteger count(java.lang.Object object)
           
 OclBoolean eq(OclSet set2)
           
 OclSet excluding(java.lang.Object object)
           
 OclSet including(java.lang.Object object)
           
 OclSet intersection(OclSet set2)
           
 OclSet minus(OclSet set2)
           
 OclSet reject(OclExpression expr)
           
 OclSet select(OclExpression expr)
           
static java.util.Set setValue(OclSet set)
          Determines the Java Set representation of an OclSet value.
 OclSet symetricDifference(OclSet set2)
           
 OclSet union(OclBag bag)
           
 OclSet union(OclSet set2)
           
 
Methods inherited from class de.tuberlin.cs.cis.ocl.eval.instance.CollectionInstance
any, collectionValue, count, equals, excludes, excludesAll, exists, forAll, getElementType, includes, includesAll, isEmpty, isUnique, iterate, notEmpty, one, size, sortedBy, sum, toString
 
Methods inherited from class de.tuberlin.cs.cis.ocl.eval.instance.PredefinedInstance
getRepresentation, getRuntimeType, getValue, hashCode, invoke, navigate
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.tuberlin.cs.cis.ocl.type.reflect.OclCollection
any, count, excludes, excludesAll, exists, forAll, includes, includesAll, isEmpty, isUnique, iterate, notEmpty, one, size, sortedBy, sum
 

Constructor Detail

SetInstance

public SetInstance(Type elemType,
                   java.util.Set setValue)
Constructs an instance of the OCL type Set via a Java Set.

Parameters:
elemType - the OCL runtime type of the elements contained in the Set.
setValue - the Java Set representation of this OCL Set.
Method Detail

setValue

public static java.util.Set setValue(OclSet set)
Determines the Java Set representation of an OclSet value.

Parameters:
set - an OclSet value
Returns:
the Java Set representation of the specified OCL set.

union

public OclSet union(OclSet set2)
Specified by:
union in interface OclSet

union

public OclSet union(OclBag bag)
Specified by:
union in interface OclSet

eq

public OclBoolean eq(OclSet set2)
Specified by:
eq in interface OclSet

intersection

public OclSet intersection(OclSet set2)
Specified by:
intersection in interface OclSet

minus

public OclSet minus(OclSet set2)
Specified by:
minus in interface OclSet

including

public OclSet including(java.lang.Object object)
Specified by:
including in interface OclSet

excluding

public OclSet excluding(java.lang.Object object)
Specified by:
excluding in interface OclSet

symetricDifference

public OclSet symetricDifference(OclSet set2)
Specified by:
symetricDifference in interface OclSet

select

public OclSet select(OclExpression expr)
Specified by:
select in interface OclSet

reject

public OclSet reject(OclExpression expr)
Specified by:
reject in interface OclSet

collect

public OclBag collect(OclExpression expr)
Specified by:
collect in interface OclSet

count

public OclInteger count(java.lang.Object object)
Specified by:
count in interface OclSet

asSequence

public OclSequence asSequence()
Specified by:
asSequence in interface OclSet

asBag

public OclBag asBag()
Specified by:
asBag in interface OclSet

clone

public java.lang.Object clone()
Overrides:
clone in class CollectionInstance