Class NumericValueExpr
- java.lang.Object
-
- org.n52.svalbard.odata.core.expr.arithmetic.NumericValueExpr
-
- All Implemented Interfaces:
ODataExpr,ArithmeticExpr,Expr
public class NumericValueExpr extends Object implements ArithmeticExpr
Expression representing a value.
-
-
Constructor Summary
Constructors Constructor Description NumericValueExpr(Number value)Creates a newValueExpr.NumericValueExpr(String value)Creates a newValueExpr.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,X extends Throwable>
Taccept(ExprVisitor<T,X> visitor)Acceptsvisitorfor this expression.Optional<NumericValueExpr>asNumericValue()Get this expression as a value expressionbooleanequals(Object o)NumbergetValue()Gets the value.inthashCode()booleanisNumericValue()Check if this expression is a number expression.StringtoODataString()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.n52.svalbard.odata.core.expr.arithmetic.ArithmeticExpr
asArithmetic, isArithmetic
-
Methods inherited from interface org.n52.svalbard.odata.core.expr.Expr
asBinary, asBoolean, asBooleanBinary, asBooleanUnary, asComparison, asGeometry, asMember, asMethodCall, asTextValue, asTime, asUnary, isBinary, isBoolean, isBooleanBinary, isBooleanUnary, isComparison, isGeometry, isMember, isMethodCall, isTextValue, isTime, isUnary
-
-
-
-
Method Detail
-
getValue
public Number getValue()
Gets the value.- Returns:
- the value
-
isNumericValue
public boolean isNumericValue()
Description copied from interface:ExprCheck if this expression is a number expression.- Specified by:
isNumericValuein interfaceExpr- Returns:
- if it is a value
-
asNumericValue
public Optional<NumericValueExpr> asNumericValue()
Description copied from interface:ExprGet this expression as a value expression- Specified by:
asNumericValuein interfaceExpr- Returns:
- the expression or
Optional.empty()if the type does not match
-
toODataString
public String toODataString()
- Specified by:
toODataStringin interfaceODataExpr
-
accept
public <T,X extends Throwable> T accept(ExprVisitor<T,X> visitor) throws X extends Throwable
Description copied from interface:ExprAcceptsvisitorfor this expression.
-
-