Class SimpleArithmeticExpr
- java.lang.Object
-
- org.n52.svalbard.odata.core.expr.BinaryExpr<FilterConstants.SimpleArithmeticOperator>
-
- org.n52.svalbard.odata.core.expr.arithmetic.SimpleArithmeticExpr
-
- All Implemented Interfaces:
ODataExpr,ArithmeticExpr,Expr
public class SimpleArithmeticExpr extends BinaryExpr<FilterConstants.SimpleArithmeticOperator> implements ArithmeticExpr
-
-
Constructor Summary
Constructors Constructor Description SimpleArithmeticExpr(FilterConstants.SimpleArithmeticOperator operator, ArithmeticExpr left, ArithmeticExpr right)Create a newBinaryExpr.
-
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<ArithmeticExpr>asArithmetic()Get this expression as a arithmetic expressionbooleanequals(Object o)inthashCode()booleanisArithmetic()Check if this expression is a arithmetic expresion.-
Methods inherited from class org.n52.svalbard.odata.core.expr.BinaryExpr
asBinary, getLeft, getOperator, getRight, isBinary, toODataString, toString
-
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.Expr
asBinary, asBoolean, asBooleanBinary, asBooleanUnary, asComparison, asGeometry, asMember, asMethodCall, asNumericValue, asTextValue, asTime, asUnary, isBinary, isBoolean, isBooleanBinary, isBooleanUnary, isComparison, isGeometry, isMember, isMethodCall, isNumericValue, isTextValue, isTime, isUnary
-
Methods inherited from interface org.n52.shetland.oasis.odata.ODataExpr
toODataString
-
-
-
-
Constructor Detail
-
SimpleArithmeticExpr
public SimpleArithmeticExpr(FilterConstants.SimpleArithmeticOperator operator, ArithmeticExpr left, ArithmeticExpr right)
Create a newBinaryExpr.- Parameters:
operator- the operatorleft- the left operandright- the right operand
-
-
Method Detail
-
isArithmetic
public boolean isArithmetic()
Check if this expression is a arithmetic expresion.- Specified by:
isArithmeticin interfaceArithmeticExpr- Specified by:
isArithmeticin interfaceExpr- Returns:
- if it is a arithmetic expression
-
asArithmetic
public Optional<ArithmeticExpr> asArithmetic()
Get this expression as a arithmetic expression- Specified by:
asArithmeticin interfaceArithmeticExpr- Specified by:
asArithmeticin interfaceExpr- Returns:
- the expression or
Optional.empty()if the type does not match
-
accept
public <T,X extends Throwable> T accept(ExprVisitor<T,X> visitor) throws X extends Throwable
Acceptsvisitorfor this expression.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBinaryExpr<FilterConstants.SimpleArithmeticOperator>
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classBinaryExpr<FilterConstants.SimpleArithmeticOperator>
-
-