类 Expression.Comparator

    • 构造器概要

      构造器 
      构造器 说明
      Comparator​(java.lang.String oper, int precedence)  
    • 方法概要

      所有方法 实例方法 抽象方法 具体方法 
      修饰符和类型 方法 说明
      abstract boolean compare​(java.lang.Comparable v1, java.lang.Comparable v2)
      This method actually implements the comparison.
      java.lang.Object eval​(java.lang.String v1, java.lang.String v2)  
      java.math.BigDecimal eval​(java.math.BigDecimal v1, java.math.BigDecimal v2)
      Implementation for this operator.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • Comparator

        public Comparator​(java.lang.String oper,
                          int precedence)
    • 方法详细资料

      • eval

        public java.math.BigDecimal eval​(java.math.BigDecimal v1,
                                         java.math.BigDecimal v2)
        从类复制的说明: Expression.Operator
        Implementation for this operator.
        指定者:
        eval 在类中 Expression.Operator
        参数:
        v1 - Operand 1.
        v2 - Operand 2.
        返回:
        The result of the operation.
      • eval

        public java.lang.Object eval​(java.lang.String v1,
                                     java.lang.String v2)
        覆盖:
        eval 在类中 Expression.Operator
      • compare

        public abstract boolean compare​(java.lang.Comparable v1,
                                        java.lang.Comparable v2)
        This method actually implements the comparison. It will be called with either 2 BigIntegers or 2 Strings.
        参数:
        v1 - Operand 1.
        v2 - Operand 2.
        返回:
        The result of the comparison.