类 OperatorExpression
- java.lang.Object
-
- org.meteoinfo.data.mathparser.ExpressionBase
-
- org.meteoinfo.data.mathparser.OperatorExpression
-
- 所有已实现的接口:
IExpression
public class OperatorExpression extends ExpressionBase
- 作者:
- yaqiang
-
-
构造器概要
构造器 构造器 说明 OperatorExpression(String operator)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 Objectadd(Object[] numbers)Add of the specified numbersObjectdivide(Object[] numbers)Divide of the specified numbersObjectevaluate(Object[] numbers)Math evaluateintgetArgumentCount()Get the number of arguments this expression usesstatic booleanisSymbol(char c)Determines whether the specified char is a math symbolstatic booleanisSymbol(String s)Determines whether the specified string is a math symbolObjectmultiple(Object[] numbers)Multiple of the specified numbersObjectpower(Object[] numbers)Power of the specified numbersObjectsubtract(Object[] numbers)Subtract of the specified numbersStringtoString()-
从类继承的方法 org.meteoinfo.data.mathparser.ExpressionBase
validate
-
-
-
-
构造器详细资料
-
OperatorExpression
public OperatorExpression(String operator)
-
-
方法详细资料
-
getArgumentCount
public int getArgumentCount()
从接口复制的说明:IExpressionGet the number of arguments this expression uses- 指定者:
getArgumentCount在接口中IExpression- 指定者:
getArgumentCount在类中ExpressionBase- 返回:
- The argument count
-
evaluate
public Object evaluate(Object[] numbers)
从接口复制的说明:IExpressionMath 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
-
-