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
public interface Expr extends ODataExpr
Interface for expressions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T,X extends Throwable>
Taccept(ExprVisitor<T,X> visitor)Acceptsvisitorfor this expression.default Optional<ArithmeticExpr>asArithmetic()Get this expression as a arithmetic expressiondefault Optional<BinaryExpr<?>>asBinary()Get this expression as a binary expressiondefault Optional<BooleanExpr>asBoolean()Get this expression as a boolean expressiondefault Optional<BooleanBinaryExpr>asBooleanBinary()Get this expression as a boolean binary expressiondefault Optional<BooleanUnaryExpr>asBooleanUnary()Get this expression as a boolean unary expressiondefault Optional<ComparisonExpr>asComparison()Get this expression as a comparison expressiondefault Optional<GeoValueExpr>asGeometry()Get this expression as a geometry expressiondefault Optional<MemberExpr>asMember()Get this expression as a member expressiondefault Optional<MethodCallExpr>asMethodCall()Get this expression as a method call expressiondefault Optional<NumericValueExpr>asNumericValue()Get this expression as a value expressiondefault Optional<TextExpr>asTextValue()Get this expression as a string expressiondefault Optional<TemporalExpr>asTime()Get this expression as a time expressiondefault Optional<UnaryExpr<?>>asUnary()Get this expression as a unary expressiondefault booleanisArithmetic()Check if this expression is a arithmetic expresion.default booleanisBinary()Check if this expression is a binary expression.default booleanisBoolean()Check if this expression is a boolean expresion.default booleanisBooleanBinary()Check if this expression is a boolean binary expression.default booleanisBooleanUnary()Check if this expression is a boolean unary expression.default booleanisComparison()Check if this expression is a comparison expression.default booleanisGeometry()Check if this expression is a geometry expresion.default booleanisMember()Check if this expression is a member expression.default booleanisMethodCall()Check if this expression is a method call expression.default booleanisNumericValue()Check if this expression is a number expression.default booleanisTextValue()Check 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 Detail
-
isTextValue
default boolean isTextValue()
Check if this expression is a string expression.- Returns:
- if it is a value
-
asTextValue
default Optional<TextExpr> 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
default Optional<MemberExpr> 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
default Optional<BinaryExpr<?>> 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
default Optional<BooleanBinaryExpr> 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
default Optional<ComparisonExpr> 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
default Optional<UnaryExpr<?>> 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
default Optional<BooleanUnaryExpr> 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
default Optional<MethodCallExpr> 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
default Optional<BooleanExpr> 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
default Optional<ArithmeticExpr> 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
default Optional<TemporalExpr> 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
default Optional<GeoValueExpr> 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
default Optional<NumericValueExpr> asNumericValue()
Get this expression as a value expression- Returns:
- the expression or
Optional.empty()if the type does not match
-
accept
<T,X extends Throwable> T accept(ExprVisitor<T,X> visitor) throws X extends Throwable
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 expressionX extends Throwable
-
-