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

java.lang.Object
  extended by org.eclipse.ocl.examples.library.AbstractFeature
      extended by org.eclipse.ocl.examples.library.AbstractOperation
          extended by org.eclipse.ocl.examples.library.AbstractUnaryOperation
              extended by org.eclipse.ocl.examples.library.numeric.AbstractNumericUnaryOperation
                  extended by org.eclipse.ocl.examples.library.numeric.NumericNegateOperation
All Implemented Interfaces:
LibraryFeature, LibraryOperation, LibraryUnaryOperation, CallableImplementation

public class NumericNegateOperation
extends AbstractNumericUnaryOperation

NegateOperation realises the unary -() library operation.

Since:
3.1

Field Summary
static NumericNegateOperation INSTANCE
           
 
Constructor Summary
NumericNegateOperation()
           
 
Method Summary
protected  Value evaluateNumeric(NumericValue left)
          Return the result of evaluating the operation on left.
 
Methods inherited from class org.eclipse.ocl.examples.library.numeric.AbstractNumericUnaryOperation
evaluate, evaluateInteger, evaluateReal, evaluateUnlimited
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractUnaryOperation
evaluate
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractOperation
evaluate, evaluateArgument, getNumArguments
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractFeature
validate
 
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.pivot.evaluation.CallableImplementation
evaluate, validate
 

Field Detail

INSTANCE

public static final NumericNegateOperation INSTANCE
Constructor Detail

NumericNegateOperation

public NumericNegateOperation()
Method Detail

evaluateNumeric

protected Value evaluateNumeric(NumericValue left)
                         throws InvalidValueException
Description copied from class: AbstractNumericUnaryOperation
Return the result of evaluating the operation on left. A null return or an exception may be used for invalid.

Overrides:
evaluateNumeric in class AbstractNumericUnaryOperation
Throws:
InvalidValueException