org.eclipse.ocl.examples.library.numeric
Class NumericDivideOperation

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.library.AbstractFeature
      extended by org.eclipse.ocl.examples.domain.library.AbstractOperation
          extended by org.eclipse.ocl.examples.domain.library.AbstractBinaryOperation
              extended by org.eclipse.ocl.examples.library.numeric.AbstractNumericBinaryOperation
                  extended by org.eclipse.ocl.examples.library.numeric.NumericDivideOperation
All Implemented Interfaces:
LibraryBinaryOperation, LibraryFeature, LibraryOperation

public class NumericDivideOperation
extends AbstractNumericBinaryOperation

DivideOperation realises the /() library operation.


Field Summary
static NumericDivideOperation INSTANCE
           
 
Constructor Summary
NumericDivideOperation()
           
 
Method Summary
protected  Value evaluateInteger(DomainEvaluator evaluator, IntegerValue left, IntegerValue right)
          Evaluate an operation for which both left and right are Integer.
protected  Value evaluateReal(DomainEvaluator evaluator, RealValue left, RealValue right)
          Evaluate an operation for which both left and right are Real.
 
Methods inherited from class org.eclipse.ocl.examples.library.numeric.AbstractNumericBinaryOperation
evaluate, evaluate, evaluateUnlimited
 
Methods inherited from class org.eclipse.ocl.examples.domain.library.AbstractBinaryOperation
evaluate
 
Methods inherited from class org.eclipse.ocl.examples.domain.library.AbstractOperation
argumentsMayBeInvalid
 
Methods inherited from class org.eclipse.ocl.examples.domain.library.AbstractFeature
getLibraryValidator, getValidator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.library.LibraryOperation
argumentsMayBeInvalid
 
Methods inherited from interface org.eclipse.ocl.examples.domain.library.LibraryFeature
getValidator
 

Field Detail

INSTANCE

public static final NumericDivideOperation INSTANCE
Constructor Detail

NumericDivideOperation

public NumericDivideOperation()
Method Detail

evaluateInteger

protected Value evaluateInteger(DomainEvaluator evaluator,
                                IntegerValue left,
                                IntegerValue right)
                         throws InvalidValueException
Description copied from class: AbstractNumericBinaryOperation
Evaluate an operation for which both left and right are Integer.

Specified by:
evaluateInteger in class AbstractNumericBinaryOperation
left - argument
right - argument
Returns:
result
Throws:
InvalidValueException

evaluateReal

protected Value evaluateReal(DomainEvaluator evaluator,
                             RealValue left,
                             RealValue right)
                      throws InvalidValueException
Description copied from class: AbstractNumericBinaryOperation
Evaluate an operation for which both left and right are Real.

Overrides:
evaluateReal in class AbstractNumericBinaryOperation
left - argument
right - argument
Returns:
result
Throws:
InvalidValueException