Class 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 Detail

      • UnaryExpr

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

      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object