Package org.n52.svalbard.odata.core.expr
Interface Expr
- All Superinterfaces:
ODataExpr
- All Known Subinterfaces:
ArithmeticExpr,BooleanExpr,DirectTextExpr,TemporalExpr,TextExpr
- All Known Implementing Classes:
BinaryExpr,BooleanBinaryExpr,BooleanUnaryExpr,ComparisonExpr,GeoValueExpr,MemberExpr,MethodCallExpr,NumericValueExpr,SimpleArithmeticExpr,StringValueExpr,TimeValueExpr,UnaryExpr
Interface for expressions.
-
Method Summary
Modifier and TypeMethodDescription<T,X extends Throwable>
Taccept(ExprVisitor<T, X> visitor) Acceptsvisitorfor this expression.default Optional<ArithmeticExpr> Get this expression as a arithmetic expressiondefault Optional<BinaryExpr<?>> asBinary()Get this expression as a binary expressiondefault Optional<BooleanExpr> Get this expression as a boolean expressiondefault Optional<BooleanBinaryExpr> Get this expression as a boolean binary expressiondefault Optional<BooleanUnaryExpr> Get this expression as a boolean unary expressiondefault Optional<ComparisonExpr> Get this expression as a comparison expressiondefault Optional<GeoValueExpr> Get this expression as a geometry expressiondefault Optional<MemberExpr> asMember()Get this expression as a member expressiondefault Optional<MethodCallExpr> Get this expression as a method call expressiondefault Optional<NumericValueExpr> Get this expression as a value expressionGet this expression as a string expressiondefault Optional<TemporalExpr> asTime()Get this expression as a time expressionasUnary()Get this expression as a unary expressiondefault booleanCheck if this expression is a arithmetic expresion.default booleanisBinary()Check if this expression is a binary expression.default booleanCheck if this expression is a boolean expresion.default booleanCheck if this expression is a boolean binary expression.default booleanCheck if this expression is a boolean unary expression.default booleanCheck if this expression is a comparison expression.default booleanCheck if this expression is a geometry expresion.default booleanisMember()Check if this expression is a member expression.default booleanCheck if this expression is a method call expression.default booleanCheck if this expression is a number expression.default booleanCheck if this expression is a string expression.default booleanisTime()Check if this expression is a time expresion.default booleanisUnary()Check if this expression is a unary expression.Methods inherited from interface org.n52.shetland.oasis.odata.ODataExpr
toODataString
-
Method Details
-
isTextValue
default boolean isTextValue()Check if this expression is a string expression.- Returns:
- if it is a value
-
asTextValue
Get this expression as a string expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isMember
default boolean isMember()Check if this expression is a member expression.- Returns:
- if it is a member
-
asMember
Get this expression as a member expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isBinary
default boolean isBinary()Check if this expression is a binary expression.- Returns:
- if it is a binary expression
-
asBinary
Get this expression as a binary expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isBooleanBinary
default boolean isBooleanBinary()Check if this expression is a boolean binary expression.- Returns:
- if it is a boolean binary expression
-
asBooleanBinary
Get this expression as a boolean binary expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isComparison
default boolean isComparison()Check if this expression is a comparison expression.- Returns:
- if it is a comparison expression
-
asComparison
Get this expression as a comparison expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isUnary
default boolean isUnary()Check if this expression is a unary expression.- Returns:
- if it is a unary expression
-
asUnary
Get this expression as a unary expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isBooleanUnary
default boolean isBooleanUnary()Check if this expression is a boolean unary expression.- Returns:
- if it is a unary boolean expression
-
asBooleanUnary
Get this expression as a boolean unary expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isMethodCall
default boolean isMethodCall()Check if this expression is a method call expression.- Returns:
- if it is a method call expression
-
asMethodCall
Get this expression as a method call expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isBoolean
default boolean isBoolean()Check if this expression is a boolean expresion.- Returns:
- if it is a boolean expression
-
asBoolean
Get this expression as a boolean expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isArithmetic
default boolean isArithmetic()Check if this expression is a arithmetic expresion.- Returns:
- if it is a arithmetic expression
-
asArithmetic
Get this expression as a arithmetic expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isTime
default boolean isTime()Check if this expression is a time expresion.- Returns:
- if it is a arithmetic expression
-
asTime
Get this expression as a time expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isGeometry
default boolean isGeometry()Check if this expression is a geometry expresion.- Returns:
- if it is a geometry expression
-
asGeometry
Get this expression as a geometry expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
isNumericValue
default boolean isNumericValue()Check if this expression is a number expression.- Returns:
- if it is a value
-
asNumericValue
Get this expression as a value expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
accept
Acceptsvisitorfor this expression.- Type Parameters:
T- the visitor's return typeX- the exception type the visitor may throw- Parameters:
visitor- the visitor- Returns:
- the result of the visit
- Throws:
X- if the visitor fails to visit this expression
-