Package net.hydromatic.filtex.ast
Enum Class AstBuilder
- All Implemented Interfaces:
Serializable,Comparable<AstBuilder>,Constable
AST Builder.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionanywhere()Creates an anywhere location.between(boolean is, Bound leftBound, Bound rightBound, @Nullable BigDecimal left, @Nullable BigDecimal right) Creates a term representing a range, such as "[0, 10)", or a comparison, such as "> 5".between(Op op, boolean is, BigDecimal number) Creates a term representing a one-sided range, such as "> 10" or "<= 0".Creates a box-shaped geographical region.circle(BigDecimal distance, Unit unit, Location location) Creates a circular geographical region.comparison(boolean is, Op op, Comparable value) Creates a comparison.comparison(boolean is, Op op, Iterable<Comparable> value) Creates a day of week literal.fiscalQuarter(int year, int quarter) Creates a fiscal year-quarter date literal.fiscalYear(int year) Creates a fiscal year date literal.interval(DatetimeUnit unit, BigDecimal value) Creates a term representing "not null" (for location).isNull(boolean is) Creates a term representing "null" or "not null".lastInterval(BigDecimal value, DatetimeUnit interval) logicalExpression(List<AstNode> terms) Folds a list into a left-deep a logical expression.logicalExpression(AstNode left, AstNode right) Creates a logical expression.matchesAdvanced(String expression) Creates a matchesAdvanced.month(int year, int month) Creates a year-month date literal.monthInterval(int year, int month, Ast.Interval end) numberLiteral(boolean is, BigDecimal value) Creates a number literal.past(BigDecimal value, DatetimeUnit unit) past(BigDecimal value, DatetimeUnit unit, boolean complete) Creates a point geographical region.quarter(int year, int quarter) Creates a year-quarter date literal.rangeInterval(Date start, Ast.Interval end) relative(boolean fromNow, Ast.Interval startInterval) relative1(boolean before, Op op, DatetimeUnit unit) relativeRange(boolean fromNow, Ast.Interval startInterval, Ast.Interval endInterval) relativeUnit(boolean before, boolean fromNow, BigDecimal value, DatetimeUnit unit) stringLiteral(boolean is, String value) Creates a string literal.thisRange(DatetimeUnit startInterval, DatetimeUnit endInterval) thisUnit(Op op, DatetimeUnit unit) static AstBuilderReturns the enum constant of this class with the specified name.static AstBuilder[]values()Returns an array containing the constants of this enum class, in the order they are declared.year(int year) Creates a year date literal.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ast
The singleton instance of the AST builder. The short name is convenient for use via 'import static', but checkstyle does not approve.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
anywhere
Creates an anywhere location. -
point
Creates a point geographical region. -
box
Creates a box-shaped geographical region. -
circle
Creates a circular geographical region. -
comparison
Creates a comparison. -
comparison
-
day
Creates a day of week literal. -
year
Creates a year date literal. -
fiscalYear
Creates a fiscal year date literal. -
quarter
Creates a year-quarter date literal. -
fiscalQuarter
Creates a fiscal year-quarter date literal. -
month
Creates a year-month date literal. -
on
-
numberLiteral
Creates a number literal. -
stringLiteral
Creates a string literal. -
logicalExpression
Creates a logical expression. -
logicalExpression
Folds a list into a left-deep a logical expression. -
isNull
Creates a term representing "null" or "not null". -
isNotNull
Creates a term representing "not null" (for location). -
between
public AstNode between(boolean is, Bound leftBound, Bound rightBound, @Nullable BigDecimal left, @Nullable BigDecimal right) Creates a term representing a range, such as "[0, 10)", or a comparison, such as "> 5". -
between
Creates a term representing a one-sided range, such as "> 10" or "<= 0". -
matchesAdvanced
Creates a matchesAdvanced. -
interval
-
rangeInterval
-
range
-
monthInterval
-
absolute
-
relativeRange
-
relative
-
relative1
-
relativeUnit
-
past
-
past
-
thisUnit
-
thisRange
-
lastInterval
-