com.rychlik.calculator
Class StackMachine.UnaryMathFunction

java.lang.Object
  extended by com.rychlik.calculator.StackMachine.MathFunction
      extended by com.rychlik.calculator.StackMachine.UnaryMathFunction
All Implemented Interfaces:
StackMachine.Instruction, java.io.Serializable
Direct Known Subclasses:
StackMachine.Abs, StackMachine.Asin, StackMachine.Atan, StackMachine.Cos, StackMachine.Exp, StackMachine.Ln, StackMachine.Negate, StackMachine.Sgn, StackMachine.Sin, StackMachine.Sqrt, StackMachine.Step, StackMachine.Tan
Enclosing class:
StackMachine

public abstract class StackMachine.UnaryMathFunction
extends StackMachine.MathFunction

Describe class UnaryMathFunction here.

See Also:
Serialized Form

Constructor Summary
StackMachine.UnaryMathFunction()
           
 
Method Summary
 int arity()
          Describe arity method here.
abstract  double eval(double x)
          Describe eval method here.
 void execute()
          Describe execute method here.
 
Methods inherited from class com.rychlik.calculator.StackMachine.MathFunction
getName, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackMachine.UnaryMathFunction

public StackMachine.UnaryMathFunction()
Method Detail

arity

public int arity()
Describe arity method here.

Returns:
an int value

execute

public void execute()
             throws ParseException
Describe execute method here.

Throws:
ParseException - if an error occurs

eval

public abstract double eval(double x)
Describe eval method here.

Parameters:
x - a double value
Returns:
a double value