Class MemberExpr

java.lang.Object
org.n52.svalbard.odata.core.expr.MemberExpr
All Implemented Interfaces:
ODataExpr, ArithmeticExpr, DirectTextExpr, Expr, TextExpr

public final class MemberExpr extends Object implements ArithmeticExpr, DirectTextExpr
Class to hold a member or value reference expression.
  • Constructor Details

    • MemberExpr

      public MemberExpr(String value)
      Create a new MemberExpr.
      Parameters:
      value - the value
  • Method Details

    • getValue

      public String getValue()
      Get the value.
      Specified by:
      getValue in interface DirectTextExpr
      Returns:
      the value
    • isMember

      public boolean isMember()
      Description copied from interface: Expr
      Check if this expression is a member expression.
      Specified by:
      isMember in interface Expr
      Returns:
      if it is a member
    • asMember

      public Optional<MemberExpr> asMember()
      Description copied from interface: Expr
      Get this expression as a member expression
      Specified by:
      asMember in interface Expr
      Returns:
      the expression or Optional.empty() if the type does not match
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • accept

      public <T, X extends Throwable> T accept(ExprVisitor<T,X> visitor) throws X
      Description copied from interface: Expr
      Accepts visitor for this expression.
      Specified by:
      accept in interface Expr
      Type Parameters:
      T - the visitor's return type
      X - 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object