com.singularsys.jep.misc.javaops
Class AbstractInc

java.lang.Object
  extended by com.singularsys.jep.functions.PostfixMathCommand
      extended by com.singularsys.jep.misc.javaops.AbstractInc
All Implemented Interfaces:
CallbackEvaluationI, PostfixMathCommandI, java.io.Serializable
Direct Known Subclasses:
PostDec, PostInc, PreDec, PreInc

public abstract class AbstractInc
extends PostfixMathCommand
implements CallbackEvaluationI

Base class for pre and post increment operators.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.singularsys.jep.functions.CallbackEvaluationI
CallbackEvaluationI.Runnable
 
Field Summary
 
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
 
Constructor Summary
AbstractInc()
           
 
Method Summary
protected  double getVal(Variable var)
           
protected  Variable getVar(Node node)
           
 void run(java.util.Stack<java.lang.Object> aStack)
          Run the function on the stack.
 
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, checkStack, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.singularsys.jep.functions.CallbackEvaluationI
evaluate
 

Constructor Detail

AbstractInc

public AbstractInc()
Method Detail

run

public void run(java.util.Stack<java.lang.Object> aStack)
         throws EvaluationException
Description copied from interface: PostfixMathCommandI
Run the function on the stack. Pops the arguments from the stack, and pushes the result on the top of the stack.

Specified by:
run in interface PostfixMathCommandI
Throws:
EvaluationException

getVar

protected Variable getVar(Node node)
                   throws EvaluationException
Throws:
EvaluationException

getVal

protected double getVal(Variable var)
                 throws EvaluationException
Throws:
EvaluationException


Copyright © 2010 Singular Systems http://www.singularsys.com/jep