Class FullTextExpression

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int PRECEDENCE_AND
      The operator precedence for AND conditions.
      static int PRECEDENCE_OR
      The operator precedence for OR conditions.
      static int PRECEDENCE_TERM
      The operator precedence for terms.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean accept​(FullTextVisitor v)
      Let the expression call the applicable visit method of the visitor.
      boolean equals​(java.lang.Object other)  
      abstract boolean evaluate​(java.lang.String value)
      Evaluate whether the value matches the condition.
      abstract int getPrecedence()
      Get the operator precedence.
      int hashCode()  
      boolean isNot()
      Whether the current FullTextExpression is a NOT condition or not.
      abstract java.lang.String toString()
      Get the string representation of the condition.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • PRECEDENCE_OR

        public static final int PRECEDENCE_OR
        The operator precedence for OR conditions.
        See Also:
        Constant Field Values
      • PRECEDENCE_AND

        public static final int PRECEDENCE_AND
        The operator precedence for AND conditions.
        See Also:
        Constant Field Values
      • PRECEDENCE_TERM

        public static final int PRECEDENCE_TERM
        The operator precedence for terms.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FullTextExpression

        public FullTextExpression()
    • Method Detail

      • getPrecedence

        public abstract int getPrecedence()
        Get the operator precedence.
        Returns:
        the precedence
      • evaluate

        public abstract boolean evaluate​(java.lang.String value)
        Evaluate whether the value matches the condition.
        Parameters:
        value - the value
        Returns:
        true if it matches
      • toString

        public abstract java.lang.String toString()
        Get the string representation of the condition.
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • accept

        public abstract boolean accept​(FullTextVisitor v)
        Let the expression call the applicable visit method of the visitor.
        Parameters:
        v - the visitor
        Returns:
        true if the visit method returned true
      • isNot

        public boolean isNot()
        Whether the current FullTextExpression is a NOT condition or not. Default is false
        Returns:
        true if the current condition represent a NOT, false otherwise.