org.eclipse.ocl.expressions.operations
Class IteratorExpOperations

java.lang.Object
  extended by org.eclipse.ocl.expressions.operations.OCLExpressionOperations
      extended by org.eclipse.ocl.expressions.operations.LoopExpOperations
          extended by org.eclipse.ocl.expressions.operations.IteratorExpOperations

public class IteratorExpOperations
extends LoopExpOperations

A static utility class that provides operations related to 'Iterator Exp' model objects.

The following operations are supported:

Generated

Constructor Summary
protected IteratorExpOperations()
           
 
Method Summary
static
<C,PM> boolean
checkBooleanBodyType(IteratorExp<C,PM> iteratorExp, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          name = 'exists' or name = 'forAll' or name = 'select' or name = 'reject' implies body.type.name = 'Boolean'
static
<C,PM> boolean
checkBooleanType(IteratorExp<C,PM> iteratorExp, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          name = 'exists' or name = 'forAll' or name = 'isUnique' implies type.oclIsKindOf(PrimitiveType) and type.name = 'Boolean'
static
<C,PM> boolean
checkCollectType(IteratorExp<C,PM> iteratorExp, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          name = 'collect' implies if source.type.oclIsKindOf(SequenceType) then type = expression.type.collectionType->select(oclIsTypeOf(SequenceType))->first() else type = expression.type.collectionType->select(oclIsTypeOf(BagType))->first() endif
static
<C,PM> boolean
checkSelectRejectType(IteratorExp<C,PM> iteratorExp, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          name = 'select' or name = 'reject' implies type = source.type
 
Methods inherited from class org.eclipse.ocl.expressions.operations.LoopExpOperations
checkLoopVariableInit, checkLoopVariableType, checkSourceCollection
 
Methods inherited from class org.eclipse.ocl.expressions.operations.OCLExpressionOperations
accept, getName, getType, setName, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorExpOperations

protected IteratorExpOperations()

Generated
Method Detail

checkBooleanType

public static <C,PM> boolean checkBooleanType(IteratorExp<C,PM> iteratorExp,
                                              org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                              java.util.Map<java.lang.Object,java.lang.Object> context)
name = 'exists' or name = 'forAll' or name = 'isUnique' implies type.oclIsKindOf(PrimitiveType) and type.name = 'Boolean'

Parameters:
iteratorExp - The receiving 'Iterator Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Generated
NOT

checkCollectType

public static <C,PM> boolean checkCollectType(IteratorExp<C,PM> iteratorExp,
                                              org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                              java.util.Map<java.lang.Object,java.lang.Object> context)
name = 'collect' implies if source.type.oclIsKindOf(SequenceType) then type = expression.type.collectionType->select(oclIsTypeOf(SequenceType))->first() else type = expression.type.collectionType->select(oclIsTypeOf(BagType))->first() endif

Parameters:
iteratorExp - The receiving 'Iterator Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Generated
NOT

checkSelectRejectType

public static <C,PM> boolean checkSelectRejectType(IteratorExp<C,PM> iteratorExp,
                                                   org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
name = 'select' or name = 'reject' implies type = source.type

Parameters:
iteratorExp - The receiving 'Iterator Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Generated
NOT

checkBooleanBodyType

public static <C,PM> boolean checkBooleanBodyType(IteratorExp<C,PM> iteratorExp,
                                                  org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)
name = 'exists' or name = 'forAll' or name = 'select' or name = 'reject' implies body.type.name = 'Boolean'

Parameters:
iteratorExp - The receiving 'Iterator Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Generated
NOT