org.scijava.sjep.eval
Class AbstractStandardStackEvaluator

java.lang.Object
  extended by org.scijava.sjep.eval.AbstractEvaluator
      extended by org.scijava.sjep.eval.AbstractStackEvaluator
          extended by org.scijava.sjep.eval.AbstractStandardStackEvaluator
All Implemented Interfaces:
Evaluator, StackEvaluator, StandardEvaluator
Direct Known Subclasses:
DefaultEvaluator

public abstract class AbstractStandardStackEvaluator
extends AbstractStackEvaluator
implements StandardEvaluator

Base class for stack-based evaluators which support the standard operators.

Author:
Curtis Rueden

Constructor Summary
AbstractStandardStackEvaluator()
           
AbstractStandardStackEvaluator(ExpressionParser parser)
           
 
Method Summary
 Object addAssign(Object a, Object b)
          Applies the Operators.ADD_ASSIGN operator.
 Object andAssign(Object a, Object b)
          Applies the Operators.AND_ASSIGN operator.
 Object assign(Object a, Object b)
          Applies the Operators.ASSIGN operator.
 Object divAssign(Object a, Object b)
          Applies the Operators.DIV_ASSIGN operator.
 Object dotDivAssign(Object a, Object b)
          Applies the Operators.DOT_DIV_ASSIGN operator.
 Object dotPowAssign(Object a, Object b)
          Applies the Operators.DOT_POW_ASSIGN operator.
 Object dotRightDivAssign(Object a, Object b)
          Applies the Operators.DOT_RIGHT_DIV_ASSIGN operator.
 Object execute(Verb verb, Deque<Object> stack)
          Executes the given operation (typically an Operator or a Function) with the specified value stack.
 Object leftShiftAssign(Object a, Object b)
          Applies the Operators.LEFT_SHIFT_ASSIGN operator.
 Object modAssign(Object a, Object b)
          Applies the Operators.MOD_ASSIGN operator.
 Object mulAssign(Object a, Object b)
          Applies the Operators.MUL_ASSIGN operator.
 Object orAssign(Object a, Object b)
          Applies the Operators.OR_ASSIGN operator.
 Object postDec(Object a)
          Applies the Operators.POST_DEC operator.
 Object postInc(Object a)
          Applies the Operators.POST_INC operator.
 Object powAssign(Object a, Object b)
          Applies the Operators.POW_ASSIGN operator.
 Object preDec(Object a)
          Applies the Operators.PRE_DEC operator.
 Object preInc(Object a)
          Applies the Operators.PRE_INC operator.
 Object rightDivAssign(Object a, Object b)
          Applies the Operators.RIGHT_DIV_ASSIGN operator.
 Object rightShiftAssign(Object a, Object b)
          Applies the Operators.RIGHT_SHIFT_ASSIGN operator.
 Object subAssign(Object a, Object b)
          Applies the Operators.SUB_ASSIGN operator.
 Object unsignedRightShiftAssign(Object a, Object b)
          Applies the Operators.UNSIGNED_RIGHT_SHIFT_ASSIGN operator.
 
Methods inherited from class org.scijava.sjep.eval.AbstractStackEvaluator
evaluate
 
Methods inherited from class org.scijava.sjep.eval.AbstractEvaluator
evaluate, evaluate, get, set, setAll, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scijava.sjep.eval.StandardEvaluator
add, bitwiseAnd, bitwiseOr, colon, complement, div, dot, dotDiv, dotMul, dotPow, dotRightDiv, dotTranspose, equal, greaterThan, greaterThanOrEqual, instanceOf, leftShift, lessThan, lessThanOrEqual, logicalAnd, logicalOr, mod, mul, neg, not, notEqual, pos, pow, rightDiv, rightShift, sub, transpose, unsignedRightShift
 
Methods inherited from interface org.scijava.sjep.eval.Evaluator
evaluate, evaluate, evaluate, get, set, setAll, value
 

Constructor Detail

AbstractStandardStackEvaluator

public AbstractStandardStackEvaluator()

AbstractStandardStackEvaluator

public AbstractStandardStackEvaluator(ExpressionParser parser)
Method Detail

postInc

public Object postInc(Object a)
Description copied from interface: StandardEvaluator
Applies the Operators.POST_INC operator.

Specified by:
postInc in interface StandardEvaluator

postDec

public Object postDec(Object a)
Description copied from interface: StandardEvaluator
Applies the Operators.POST_DEC operator.

Specified by:
postDec in interface StandardEvaluator

preInc

public Object preInc(Object a)
Description copied from interface: StandardEvaluator
Applies the Operators.PRE_INC operator.

Specified by:
preInc in interface StandardEvaluator

preDec

public Object preDec(Object a)
Description copied from interface: StandardEvaluator
Applies the Operators.PRE_DEC operator.

Specified by:
preDec in interface StandardEvaluator

assign

public Object assign(Object a,
                     Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.ASSIGN operator.

Specified by:
assign in interface StandardEvaluator

powAssign

public Object powAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.POW_ASSIGN operator.

Specified by:
powAssign in interface StandardEvaluator

dotPowAssign

public Object dotPowAssign(Object a,
                           Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.DOT_POW_ASSIGN operator.

Specified by:
dotPowAssign in interface StandardEvaluator

mulAssign

public Object mulAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.MUL_ASSIGN operator.

Specified by:
mulAssign in interface StandardEvaluator

divAssign

public Object divAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.DIV_ASSIGN operator.

Specified by:
divAssign in interface StandardEvaluator

modAssign

public Object modAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.MOD_ASSIGN operator.

Specified by:
modAssign in interface StandardEvaluator

rightDivAssign

public Object rightDivAssign(Object a,
                             Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.RIGHT_DIV_ASSIGN operator.

Specified by:
rightDivAssign in interface StandardEvaluator

dotDivAssign

public Object dotDivAssign(Object a,
                           Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.DOT_DIV_ASSIGN operator.

Specified by:
dotDivAssign in interface StandardEvaluator

dotRightDivAssign

public Object dotRightDivAssign(Object a,
                                Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.DOT_RIGHT_DIV_ASSIGN operator.

Specified by:
dotRightDivAssign in interface StandardEvaluator

addAssign

public Object addAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.ADD_ASSIGN operator.

Specified by:
addAssign in interface StandardEvaluator

subAssign

public Object subAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.SUB_ASSIGN operator.

Specified by:
subAssign in interface StandardEvaluator

andAssign

public Object andAssign(Object a,
                        Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.AND_ASSIGN operator.

Specified by:
andAssign in interface StandardEvaluator

orAssign

public Object orAssign(Object a,
                       Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.OR_ASSIGN operator.

Specified by:
orAssign in interface StandardEvaluator

leftShiftAssign

public Object leftShiftAssign(Object a,
                              Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.LEFT_SHIFT_ASSIGN operator.

Specified by:
leftShiftAssign in interface StandardEvaluator

rightShiftAssign

public Object rightShiftAssign(Object a,
                               Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.RIGHT_SHIFT_ASSIGN operator.

Specified by:
rightShiftAssign in interface StandardEvaluator

unsignedRightShiftAssign

public Object unsignedRightShiftAssign(Object a,
                                       Object b)
Description copied from interface: StandardEvaluator
Applies the Operators.UNSIGNED_RIGHT_SHIFT_ASSIGN operator.

Specified by:
unsignedRightShiftAssign in interface StandardEvaluator

execute

public Object execute(Verb verb,
                      Deque<Object> stack)
Description copied from interface: StackEvaluator
Executes the given operation (typically an Operator or a Function) with the specified value stack.

Specified by:
execute in interface StackEvaluator


Copyright © 2015 SciJava. All rights reserved.