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

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.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

public class NumericNegateOperation
extends AbstractNumericUnaryOperation

NegateOperation realises the unary -() library operation.


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.domain.library.AbstractUnaryOperation
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 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