Class AndTerm

  • All Implemented Interfaces:
    java.io.Serializable

    public final class AndTerm
    extends SearchTerm
    A logical AND of a number of search terms.
    Version:
    1.4
    Author:
    Chris Burdess
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected SearchTerm[] terms
      The target terms.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      SearchTerm[] getTerms()
      Returns the search terms.
      int hashCode()  
      boolean match​(Message message)
      Returns true only if all the terms match the specified message.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • terms

        protected SearchTerm[] terms
        The target terms.
    • Constructor Detail

      • AndTerm

        public AndTerm​(SearchTerm t1,
                       SearchTerm t2)
        Constructor with two terms.
        Parameters:
        t1 - the first term
        t2 - the second term
      • AndTerm

        public AndTerm​(SearchTerm[] t)
        Constructor with multiple terms.
        Parameters:
        t - the terms
    • Method Detail

      • getTerms

        public SearchTerm[] getTerms()
        Returns the search terms.
      • match

        public boolean match​(Message message)
        Returns true only if all the terms match the specified message.
        Specified by:
        match in class SearchTerm
      • 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