|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ocl.examples.library.AbstractFeature org.eclipse.ocl.examples.library.AbstractOperation org.eclipse.ocl.examples.library.AbstractBinaryOperation org.eclipse.ocl.examples.library.numeric.AbstractNumericBinaryOperation
public abstract class AbstractNumericBinaryOperation
AbstractNumericBinaryOperation dispatches a binary library operation to matching-type-specific call-backs.
Constructor Summary | |
---|---|
AbstractNumericBinaryOperation()
|
Method Summary | ||
---|---|---|
protected
|
evaluate(ValueFactory valueFactory,
T left,
T right)
Return the result of evaluating the operation on left and right which are both of the same derived Number type. |
|
Value |
evaluate(ValueFactory valueFactory,
Value left,
Value right)
Return the result of evaluating the operation on left and right arguments. |
|
protected Value |
evaluateInteger(ValueFactory valueFactory,
IntegerValue left,
IntegerValue right)
Evaluate an operation for which both left and right are Integer. |
|
protected Value |
evaluateReal(ValueFactory valueFactory,
RealValue left,
RealValue right)
Evaluate an operation for which both left and right are Real. |
|
protected Value |
evaluateUnlimited(ValueFactory valueFactory,
Value left,
Value right)
Evaluate an operation for which at least one of left and right are unlimited and for which neither left nor right are invalid or null. |
Methods inherited from class org.eclipse.ocl.examples.library.AbstractBinaryOperation |
---|
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 |
Constructor Detail |
---|
public AbstractNumericBinaryOperation()
Method Detail |
---|
public Value evaluate(ValueFactory valueFactory, Value left, Value right) throws InvalidValueException
LibraryBinaryOperation
left
- left argumentright
- argument
InvalidValueException
protected Value evaluateInteger(ValueFactory valueFactory, IntegerValue left, IntegerValue right) throws InvalidValueException
left
- argumentright
- argument
InvalidValueException
protected Value evaluateReal(ValueFactory valueFactory, RealValue left, RealValue right) throws InvalidValueException
left
- argumentright
- argument
InvalidValueException
protected Value evaluateUnlimited(ValueFactory valueFactory, Value left, Value right) throws InvalidValueException
left
- argumentright
- argument
InvalidValueException
protected <T extends java.lang.Number & java.lang.Comparable<T>> java.lang.Object evaluate(ValueFactory valueFactory, T left, T right) throws InvalidValueException
InvalidValueException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |