Class UnaryExpr<T>

java.lang.Object
org.n52.svalbard.odata.core.expr.UnaryExpr<T>
Type Parameters:
T - the operator type
All Implemented Interfaces:
ODataExpr, Expr
Direct Known Subclasses:
BooleanUnaryExpr

public abstract class UnaryExpr<T> extends Object implements Expr
Class to represent a unary expression.
  • Constructor Details

    • UnaryExpr

      public UnaryExpr(T operator, Expr operand)
      Create a new UnaryExpr.
      Parameters:
      operator - the operator
      operand - the operand
  • Method Details

    • getOperator

      public T getOperator()
      Get the operator.
      Returns:
      the operator
    • getOperand

      public Expr getOperand()
      Get the operand
      Returns:
      the operand
    • asUnary

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

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

      public String toODataString()
      Specified by:
      toODataString in interface ODataExpr
    • hashCode

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

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