类 OperatorExpression

    • 构造器详细资料

      • OperatorExpression

        public OperatorExpression​(String operator)
    • 方法详细资料

      • evaluate

        public Object evaluate​(Object[] numbers)
        从接口复制的说明: IExpression
        Math evaluate
        参数:
        numbers - The numbers to evaluate
        返回:
        The result of the evaluated numbers
      • add

        public Object add​(Object[] numbers)
        Add of the specified numbers
        参数:
        numbers - The numbers
        返回:
        The result of the operation
      • subtract

        public Object subtract​(Object[] numbers)
        Subtract of the specified numbers
        参数:
        numbers - The numbers
        返回:
        The result of the operation
      • multiple

        public Object multiple​(Object[] numbers)
        Multiple of the specified numbers
        参数:
        numbers - The numbers
        返回:
        The result of the operation
      • divide

        public Object divide​(Object[] numbers)
        Divide of the specified numbers
        参数:
        numbers - The numbers
        返回:
        The result of the operation
      • power

        public Object power​(Object[] numbers)
        Power of the specified numbers
        参数:
        numbers - The numbers
        返回:
        The result of the operation
      • isSymbol

        public static boolean isSymbol​(String s)
        Determines whether the specified string is a math symbol
        参数:
        s - The string to check
        返回:
        If the string is a math symbol
      • isSymbol

        public static boolean isSymbol​(char c)
        Determines whether the specified char is a math symbol
        参数:
        c - The char to check
        返回:
        If the char is a math symbol