Module jakarta.mail

Class OlderTerm

  • All Implemented Interfaces:
    java.io.Serializable

    public final class OlderTerm
    extends SearchTerm
    Find messages that are older than a given interval (in seconds). Relies on the server implementing the WITHIN search extension (RFC 5032).
    Since:
    JavaMail 1.5.1
    Author:
    Bill Shannon
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      OlderTerm​(int interval)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Equality comparison.
      int getInterval()
      Return the interval.
      int hashCode()
      Compute a hashCode for this object.
      boolean match​(Message msg)
      The match method.
      • Methods inherited from class java.lang.Object

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

      • OlderTerm

        public OlderTerm​(int interval)
        Constructor.
        Parameters:
        interval - number of seconds older
    • Method Detail

      • getInterval

        public int getInterval()
        Return the interval.
        Returns:
        the interval
      • match

        public boolean match​(Message msg)
        The match method.
        Specified by:
        match in class SearchTerm
        Parameters:
        msg - the date comparator is applied to this Message's received date
        Returns:
        true if the comparison succeeds, otherwise false
      • equals

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

        public int hashCode()
        Compute a hashCode for this object.
        Overrides:
        hashCode in class java.lang.Object