Class HeaderTerm

  • All Implemented Interfaces:
    java.io.Serializable

    public final class HeaderTerm
    extends StringTerm
    A case-insensitive string comparison of message header values.
    Version:
    1.4
    Author:
    Chris Burdess
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HeaderTerm​(java.lang.String headerName, java.lang.String pattern)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      java.lang.String getHeaderName()
      Returns the name of the header to compare with.
      int hashCode()  
      boolean match​(Message msg)
      Returns true if the header in the specified message matches the pattern specified in this term.
      • Methods inherited from class java.lang.Object

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

      • headerName

        protected java.lang.String headerName
        The header name.
    • Constructor Detail

      • HeaderTerm

        public HeaderTerm​(java.lang.String headerName,
                          java.lang.String pattern)
        Constructor.
        Parameters:
        headerName - the header name
        pattern - the pattern to search for
    • Method Detail

      • getHeaderName

        public java.lang.String getHeaderName()
        Returns the name of the header to compare with.
      • match

        public boolean match​(Message msg)
        Returns true if the header in the specified message matches the pattern specified in this term.
        Specified by:
        match in class SearchTerm
      • equals

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