com.ibm.tivoli.maximo.expression

Class Expression.Operator

  • java.lang.Object
    • com.ibm.tivoli.maximo.expression.Expression.Operator
  • Enclosing class:
    Expression


    public abstract class Expression.Operator
    extends java.lang.Object
    Abstract definition of a supported operator. An operator is defined by its name (pattern), precedence and if it is left- or right associative.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Operator(java.lang.String oper, int precedence, boolean leftAssoc)
      Creates a new operator.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract java.math.BigDecimal eval(java.math.BigDecimal v1, java.math.BigDecimal v2)
      Implementation for this operator.
      java.lang.String getOper() 
      int getPrecedence() 
      boolean isLeftAssoc() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Operator

        public Operator(java.lang.String oper,
                        int precedence,
                        boolean leftAssoc)
        Creates a new operator.
        Parameters:
        oper - The operator name (pattern).
        precedence - The operators precedence.
        leftAssoc - true if the operator is left associative, else false.
    • Method Detail

      • getOper

        public java.lang.String getOper()
      • getPrecedence

        public int getPrecedence()
      • isLeftAssoc

        public boolean isLeftAssoc()
      • eval

        public abstract java.math.BigDecimal eval(java.math.BigDecimal v1,
                                                  java.math.BigDecimal v2)
        Implementation for this operator.
        Parameters:
        v1 - Operand 1.
        v2 - Operand 2.
        Returns:
        The result of the operation.