Class Plus
java.lang.Object
calculator.operations.Operation
calculator.operations.Plus
- All Implemented Interfaces:
Expression
This class represents the arithmetic sum operation "+".
The class extends an abstract superclass Operation.
Other subclasses of Operation represent other arithmetic operations.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPlus(List<Expression> elist) Class constructor specifying a number of Expressions to add. -
Method Summary
Modifier and TypeMethodDescriptionAbstract method representing the actual binary arithmetic operation to compute on Complexesop(IntegerAtom i1, IntegerAtom i2) The actual computation of the (binary) arithmetic addition of two IntegersAbstract method representing the actual binary arithmetic operation to compute on RationnalsThe actual computation of the (binary) arithmetic addition of two Reals
-
Constructor Details
-
Plus
Class constructor specifying a number of Expressions to add.- Parameters:
elist- The list of Expressions to add- Throws:
IllegalConstruction- If an empty list of expressions if passed as parameter- See Also:
-
-
Method Details
-
op
-
op
The actual computation of the (binary) arithmetic addition of two Integers -
op
Description copied from class:OperationAbstract method representing the actual binary arithmetic operation to compute on Complexes -
op
Description copied from class:OperationAbstract method representing the actual binary arithmetic operation to compute on Rationnals
-