com.rychlik.calculator
Class Function
java.lang.Object
|
+--com.rychlik.calculator.Function
- public abstract class Function
- extends java.lang.Object
This class represents a function of an arbitrary arity
taking double artuments and returning double.
Method Summary |
abstract int |
arity()
|
protected abstract void |
eval(java.util.Stack s)
|
void |
execute(java.util.Stack s)
|
abstract java.lang.String |
name()
|
protected double |
pop(java.util.Stack s)
|
protected void |
push(java.util.Stack s,
double x)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Function
public Function()
name
public abstract java.lang.String name()
arity
public abstract int arity()
eval
protected abstract void eval(java.util.Stack s)
pop
protected double pop(java.util.Stack s)
push
protected void push(java.util.Stack s,
double x)
execute
public void execute(java.util.Stack s)
throws ParseException
ParseException
|