类 OperatorExpression
- java.lang.Object
-
- org.meteoinfo.data.mathparser.ExpressionBase
-
- org.meteoinfo.data.mathparser.OperatorExpression
-
- 所有已实现的接口:
IExpression
public class OperatorExpression extends ExpressionBase
- 作者:
- yaqiang
-
-
构造器概要
构造器 构造器 说明 OperatorExpression(java.lang.String operator)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.Objectadd(java.lang.Object[] numbers)Add of the specified numbersjava.lang.Objectdivide(java.lang.Object[] numbers)Divide of the specified numbersjava.lang.Objectevaluate(java.lang.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(java.lang.String s)Determines whether the specified string is a math symboljava.lang.Objectmultiple(java.lang.Object[] numbers)Multiple of the specified numbersjava.lang.Objectpower(java.lang.Object[] numbers)Power of the specified numbersjava.lang.Objectsubtract(java.lang.Object[] numbers)Subtract of the specified numbersjava.lang.StringtoString()-
从类继承的方法 org.meteoinfo.data.mathparser.ExpressionBase
validate
-
-
-
-
方法详细资料
-
getArgumentCount
public int getArgumentCount()
从接口复制的说明:IExpressionGet the number of arguments this expression uses- 指定者:
getArgumentCount在接口中IExpression- 指定者:
getArgumentCount在类中ExpressionBase- 返回:
- The argument count
-
evaluate
public java.lang.Object evaluate(java.lang.Object[] numbers)
从接口复制的说明:IExpressionMath evaluate- 参数:
numbers- The numbers to evaluate- 返回:
- The result of the evaluated numbers
-
add
public java.lang.Object add(java.lang.Object[] numbers)
Add of the specified numbers- 参数:
numbers- The numbers- 返回:
- The result of the operation
-
subtract
public java.lang.Object subtract(java.lang.Object[] numbers)
Subtract of the specified numbers- 参数:
numbers- The numbers- 返回:
- The result of the operation
-
multiple
public java.lang.Object multiple(java.lang.Object[] numbers)
Multiple of the specified numbers- 参数:
numbers- The numbers- 返回:
- The result of the operation
-
divide
public java.lang.Object divide(java.lang.Object[] numbers)
Divide of the specified numbers- 参数:
numbers- The numbers- 返回:
- The result of the operation
-
power
public java.lang.Object power(java.lang.Object[] numbers)
Power of the specified numbers- 参数:
numbers- The numbers- 返回:
- The result of the operation
-
isSymbol
public static boolean isSymbol(java.lang.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
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
-