## org.eclipse.ocl.expressions
Interface IfExp<C>

All Superinterfaces:
  ASTNode, EObject, Notifier, OCLExpression<C>, TypedElement<C>, Visitable

All Known Subinterfaces:
  IfExp, IfExp

All Known Implementing Classes:
  IfExpImpl, IfExpImpl, IfExpImpl

    public interface IfExp<C>

extends OCLExpression<C>

A representation of the model object 'If Exp'.

The following features are supported:

- `Condition`
- `Then Expression`
- `Else Expression`

See Also:
  `ExpressionsPackage.getIfExp()`

Method Summary
`boolean` `checkBooleanCondition(DiagnosticChain diagnostics, Map<Object,Object> context)` self.condition.type.oclIsKindOf(PrimitiveType) and self.condition.type.name = 'Boolean'
`boolean` `checkIfType(DiagnosticChain diagnostics, Map<Object,Object> context)` self.type = thenExpression.type.commonSuperType(elseExpression.type)
`OCLExpression<C>` `getCondition()` Returns the value of the 'Condition' containment reference
`OCLExpression<C>` `getElseExpression()` Returns the value of the 'Else Expression' containment reference
`OCLExpression<C>` `getThenExpression()` Returns the value of the 'Then Expression' containment reference
`void` `setCondition(OCLExpression<C> value)` Sets the value of the '`Condition`' containment reference
`void` `setElseExpression(OCLExpression<C> value)` Sets the value of the '`Else Expression`' containment reference
`void` `setThenExpression(OCLExpression<C> value)` Sets the value of the '`Then Expression`' containment reference

Methods inherited from interface org.eclipse.ocl.utilities.TypedElement
`getName, getType, setName, setType`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.ocl.utilities.Visitable
`accept`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.ocl.utilities.ASTNode
`getEndPosition, getStartPosition, setEndPosition, setStartPosition`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Method Detail

### getCondition

    OCLExpression<C> getCondition()

  Returns the value of the 'Condition' containment reference.

  If the meaning of the 'Condition' containment reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Condition' containment reference.
  See Also:
    `setCondition(OCLExpression)`, `ExpressionsPackage.getIfExp_Condition()`

### setCondition

    void setCondition(OCLExpression<C> value)

  Sets the value of the '`Condition`' containment reference.

  Parameters:
    `value` - the new value of the 'Condition' containment reference.
  See Also:
    `getCondition()`

### getThenExpression

    OCLExpression<C> getThenExpression()

  Returns the value of the 'Then Expression' containment reference.

  If the meaning of the 'Then Expression' containment reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Then Expression' containment reference.
  See Also:
    `setThenExpression(OCLExpression)`, `ExpressionsPackage.getIfExp_ThenExpression()`

### setThenExpression

    void setThenExpression(OCLExpression<C> value)

  Sets the value of the '`Then Expression`' containment reference.

  Parameters:
    `value` - the new value of the 'Then Expression' containment reference.
  See Also:
    `getThenExpression()`

### getElseExpression

    OCLExpression<C> getElseExpression()

  Returns the value of the 'Else Expression' containment reference.

  If the meaning of the 'Else Expression' containment reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Else Expression' containment reference.
  See Also:
    `setElseExpression(OCLExpression)`, `ExpressionsPackage.getIfExp_ElseExpression()`

### setElseExpression

    void setElseExpression(OCLExpression<C> value)

  Sets the value of the '`Else Expression`' containment reference.

  Parameters:
    `value` - the new value of the 'Else Expression' containment reference.
  See Also:
    `getElseExpression()`

### checkBooleanCondition

    boolean checkBooleanCondition(DiagnosticChain diagnostics,
                                  Map<Object,Object> context)

  self.condition.type.oclIsKindOf(PrimitiveType) and self.condition.type.name = 'Boolean'

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### checkIfType

    boolean checkIfType(DiagnosticChain diagnostics,
                        Map<Object,Object> context)

  self.type = thenExpression.type.commonSuperType(elseExpression.type)

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.