public class Add extends PostfixMathCommand
Constructor and Description |
---|
Add() |
Modifier and Type | Method and Description |
---|---|
Complex |
add(Complex c1,
Complex c2) |
Complex |
add(Complex c,
Number d) |
Double |
add(Number d1,
Number d2) |
Object |
add(Object param1,
Object param2)
Adds two numbers together.
|
void |
run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
public void run(Stack stack) throws ParseException
run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
ParseException
public Object add(Object param1, Object param2) throws ParseException
param1
- The first parameter to be added.param2
- The second parameter to be added.ParseException
Jas4pp 1.5 © Java Analysis Studio for Particle Physics