Enum Class AstBuilder

java.lang.Object
java.lang.Enum<AstBuilder>
net.hydromatic.filtex.ast.AstBuilder
All Implemented Interfaces:
Serializable, Comparable<AstBuilder>, Constable

public enum AstBuilder extends Enum<AstBuilder>
AST Builder.
  • Enum Constant Details

    • ast

      public static final AstBuilder 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

      public static AstBuilder[] 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

      public static AstBuilder valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • anywhere

      public AstNode anywhere()
      Creates an anywhere location.
    • point

      public AstNode point(Location location)
      Creates a point geographical region.
    • box

      public AstNode box(Location from, Location to)
      Creates a box-shaped geographical region.
    • circle

      public AstNode circle(BigDecimal distance, Unit unit, Location location)
      Creates a circular geographical region.
    • comparison

      public Ast.Comparison comparison(boolean is, Op op, Comparable value)
      Creates a comparison.
    • comparison

      public Ast.Comparison comparison(boolean is, Op op, Iterable<Comparable> value)
    • day

      public AstNode day(String day)
      Creates a day of week literal.
    • year

      public AstNode year(int year)
      Creates a year date literal.
    • fiscalYear

      public AstNode fiscalYear(int year)
      Creates a fiscal year date literal.
    • quarter

      public AstNode quarter(int year, int quarter)
      Creates a year-quarter date literal.
    • fiscalQuarter

      public AstNode fiscalQuarter(int year, int quarter)
      Creates a fiscal year-quarter date literal.
    • month

      public AstNode month(int year, int month)
      Creates a year-month date literal.
    • on

      public AstNode on(Date date)
    • numberLiteral

      public Ast.Comparison numberLiteral(boolean is, BigDecimal value)
      Creates a number literal.
    • stringLiteral

      public Ast.Comparison stringLiteral(boolean is, String value)
      Creates a string literal.
    • logicalExpression

      public AstNode logicalExpression(AstNode left, AstNode right)
      Creates a logical expression.
    • logicalExpression

      public AstNode logicalExpression(List<AstNode> terms)
      Folds a list into a left-deep a logical expression.
    • isNull

      public AstNode isNull(boolean is)
      Creates a term representing "null" or "not null".
    • isNotNull

      public AstNode 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

      public AstNode between(Op op, boolean is, BigDecimal number)
      Creates a term representing a one-sided range, such as "> 10" or "<= 0".
    • matchesAdvanced

      public Ast.MatchesAdvanced matchesAdvanced(String expression)
      Creates a matchesAdvanced.
    • interval

      public Ast.Interval interval(DatetimeUnit unit, BigDecimal value)
    • rangeInterval

      public AstNode rangeInterval(Date start, Ast.Interval end)
    • range

      public AstNode range(Date start, Date end)
    • monthInterval

      public AstNode monthInterval(int year, int month, Ast.Interval end)
    • absolute

      public AstNode absolute(Date date, boolean before)
    • relativeRange

      public AstNode relativeRange(boolean fromNow, Ast.Interval startInterval, Ast.Interval endInterval)
    • relative

      public AstNode relative(boolean fromNow, Ast.Interval startInterval)
    • relative1

      public AstNode relative1(boolean before, Op op, DatetimeUnit unit)
    • relativeUnit

      public AstNode relativeUnit(boolean before, boolean fromNow, BigDecimal value, DatetimeUnit unit)
    • past

      public AstNode past(BigDecimal value, DatetimeUnit unit, boolean complete)
    • past

      public AstNode past(BigDecimal value, DatetimeUnit unit)
    • thisUnit

      public AstNode thisUnit(Op op, DatetimeUnit unit)
    • thisRange

      public AstNode thisRange(DatetimeUnit startInterval, DatetimeUnit endInterval)
    • lastInterval

      public AstNode lastInterval(BigDecimal value, DatetimeUnit interval)