类 NumberExpression
- java.lang.Object
-
- org.meteoinfo.data.mathparser.ExpressionBase
-
- org.meteoinfo.data.mathparser.NumberExpression
-
- 所有已实现的接口:
IExpression
public class NumberExpression extends ExpressionBase
- 作者:
- yaqiang
-
-
构造器概要
构造器 构造器 说明 NumberExpression(Object value)Constructor
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 Objectevaluate(Object[] numbers)Math evaluateintgetArgumentCount()Get the number of arguments this expression usesObjectgetValue()Get valueValueTypesgetValueType()Get value typestatic booleanisNegativeSign(char c)Determines whether the specified char is negative signstatic booleanisNumber(char c)Determines whether the specified char is a numbervoidsetValueType(ValueTypes value)Set value typeStringtoString()To string-
从类继承的方法 org.meteoinfo.data.mathparser.ExpressionBase
validate
-
-
-
-
构造器详细资料
-
NumberExpression
public NumberExpression(Object value)
Constructor- 参数:
value- Value object
-
-
方法详细资料
-
getValueType
public ValueTypes getValueType()
Get value type- 返回:
- Value type
-
setValueType
public void setValueType(ValueTypes value)
Set value type- 参数:
value- Value type
-
getValue
public Object getValue()
Get value- 返回:
- Value
-
evaluate
public Object evaluate(Object[] numbers)
从接口复制的说明:IExpressionMath evaluate- 参数:
numbers- The numbers to evaluate- 返回:
- The result of the evaluated numbers
-
getArgumentCount
public int getArgumentCount()
从接口复制的说明:IExpressionGet the number of arguments this expression uses- 指定者:
getArgumentCount在接口中IExpression- 指定者:
getArgumentCount在类中ExpressionBase- 返回:
- The argument count
-
isNumber
public static boolean isNumber(char c)
Determines whether the specified char is a number- 参数:
c- The char- 返回:
- If the char is a digit or a decimal separator
-
isNegativeSign
public static boolean isNegativeSign(char c)
Determines whether the specified char is negative sign- 参数:
c- The char to check- 返回:
- If the char is negative sign
-
-