Interface StandardEvaluator

All Superinterfaces:
Evaluator
All Known Subinterfaces:
StandardStackEvaluator, StandardTreeEvaluator
All Known Implementing Classes:
AbstractStandardEvaluator, DefaultStackEvaluator, DefaultTreeEvaluator

public interface StandardEvaluator extends Evaluator
Interface for expression evaluators which support the standard operators.
Author:
Curtis Rueden
  • Method Details

    • function

      Object function(Object a, Object b)
      Applies the Function operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dot

      Object dot(Object a, Object b)
      Applies the Operators.DOT operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • parens

      Object parens(Object... args)
      Applies the Operators.PARENS operator.
      Parameters:
      args - The arguments.
      Returns:
      The result of the operation.
    • brackets

      Object brackets(Object... args)
      Applies the Operators.BRACKETS operator.
      Parameters:
      args - The arguments.
      Returns:
      The result of the operation.
    • braces

      Object braces(Object... args)
      Applies the Operators.BRACES operator.
      Parameters:
      args - The arguments.
      Returns:
      The result of the operation.
    • transpose

      Object transpose(Object a)
      Applies the Operators.TRANSPOSE operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • dotTranspose

      Object dotTranspose(Object a)
      Applies the Operators.DOT_TRANSPOSE operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • pow

      Object pow(Object a, Object b)
      Applies the Operators.POW operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotPow

      Object dotPow(Object a, Object b)
      Applies the Operators.DOT_POW operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • postInc

      default Object postInc(Object a)
      Applies the Operators.POST_INC operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • postDec

      default Object postDec(Object a)
      Applies the Operators.POST_DEC operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • preInc

      default Object preInc(Object a)
      Applies the Operators.PRE_INC operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • preDec

      default Object preDec(Object a)
      Applies the Operators.PRE_DEC operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • pos

      Object pos(Object a)
      Applies the Operators.POS operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • neg

      Object neg(Object a)
      Applies the Operators.NEG operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • complement

      Object complement(Object a)
      Applies the Operators.COMPLEMENT operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • not

      Object not(Object a)
      Applies the Operators.NOT operator.
      Parameters:
      a - The argument.
      Returns:
      The result of the operation.
    • mul

      Object mul(Object a, Object b)
      Applies the Operators.MUL operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • div

      Object div(Object a, Object b)
      Applies the Operators.DIV operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • mod

      Object mod(Object a, Object b)
      Applies the Operators.MOD operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • rightDiv

      Object rightDiv(Object a, Object b)
      Applies the Operators.RIGHT_DIV operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotMul

      Object dotMul(Object a, Object b)
      Applies the Operators.DOT_MUL operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotDiv

      Object dotDiv(Object a, Object b)
      Applies the Operators.DOT_DIV operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotRightDiv

      Object dotRightDiv(Object a, Object b)
      Applies the Operators.DOT_RIGHT_DIV operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • add

      Object add(Object a, Object b)
      Applies the Operators.ADD operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • sub

      Object sub(Object a, Object b)
      Applies the Operators.SUB operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • leftShift

      Object leftShift(Object a, Object b)
      Applies the Operators.LEFT_SHIFT operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • rightShift

      Object rightShift(Object a, Object b)
      Applies the Operators.RIGHT_SHIFT operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • unsignedRightShift

      Object unsignedRightShift(Object a, Object b)
      Applies the Operators.UNSIGNED_RIGHT_SHIFT operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • lessThan

      Object lessThan(Object a, Object b)
      Applies the Operators.LESS_THAN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • greaterThan

      Object greaterThan(Object a, Object b)
      Applies the Operators.GREATER_THAN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • lessThanOrEqual

      Object lessThanOrEqual(Object a, Object b)
      Applies the Operators.LESS_THAN_OR_EQUAL operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • greaterThanOrEqual

      Object greaterThanOrEqual(Object a, Object b)
      Applies the Operators.GREATER_THAN_OR_EQUAL operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • instanceOf

      Object instanceOf(Object a, Object b)
      Applies the Operators.INSTANCEOF operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • equal

      Object equal(Object a, Object b)
      Applies the Operators.EQUAL operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • notEqual

      Object notEqual(Object a, Object b)
      Applies the Operators.NOT_EQUAL operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • bitwiseAnd

      Object bitwiseAnd(Object a, Object b)
      Applies the Operators.BITWISE_AND operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • bitwiseOr

      Object bitwiseOr(Object a, Object b)
      Applies the Operators.BITWISE_OR operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • logicalAnd

      Object logicalAnd(Object a, Object b)
      Applies the Operators.LOGICAL_AND operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • logicalOr

      Object logicalOr(Object a, Object b)
      Applies the Operators.LOGICAL_OR operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • question

      Object question(Object a, Object b)
      Applies the Operators.QUESTION operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • colon

      Object colon(Object a, Object b)
      Applies the Operators.COLON operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • assign

      default Object assign(Object a, Object b)
      Applies the Operators.ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • powAssign

      default Object powAssign(Object a, Object b)
      Applies the Operators.POW_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotPowAssign

      default Object dotPowAssign(Object a, Object b)
      Applies the Operators.DOT_POW_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • mulAssign

      default Object mulAssign(Object a, Object b)
      Applies the Operators.MUL_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • divAssign

      default Object divAssign(Object a, Object b)
      Applies the Operators.DIV_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • modAssign

      default Object modAssign(Object a, Object b)
      Applies the Operators.MOD_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • rightDivAssign

      default Object rightDivAssign(Object a, Object b)
      Applies the Operators.RIGHT_DIV_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotDivAssign

      default Object dotDivAssign(Object a, Object b)
      Applies the Operators.DOT_DIV_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • dotRightDivAssign

      default Object dotRightDivAssign(Object a, Object b)
      Applies the Operators.DOT_RIGHT_DIV_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • addAssign

      default Object addAssign(Object a, Object b)
      Applies the Operators.ADD_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • subAssign

      default Object subAssign(Object a, Object b)
      Applies the Operators.SUB_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • andAssign

      default Object andAssign(Object a, Object b)
      Applies the Operators.AND_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • orAssign

      default Object orAssign(Object a, Object b)
      Applies the Operators.OR_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • leftShiftAssign

      default Object leftShiftAssign(Object a, Object b)
      Applies the Operators.LEFT_SHIFT_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • rightShiftAssign

      default Object rightShiftAssign(Object a, Object b)
      Applies the Operators.RIGHT_SHIFT_ASSIGN operator.
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • unsignedRightShiftAssign

      default Object unsignedRightShiftAssign(Object a, Object b)
      Parameters:
      a - The first argument.
      b - The second argument.
      Returns:
      The result of the operation.
    • execute

      default Object execute(Operator op, Object... args)
      Performs an operation.
      Parameters:
      op - The operator to execute.
      args - The arguments to pass.
      Returns:
      The result of the operation.