Class YoungerTerm

java.lang.Object
jakarta.mail.search.SearchTerm
com.sun.mail.imap.YoungerTerm
All Implemented Interfaces:
Serializable

public final class YoungerTerm extends jakarta.mail.search.SearchTerm
Find messages that are younger 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:
  • Constructor Details

    • YoungerTerm

      public YoungerTerm(int interval)
      Constructor.
      Parameters:
      interval - number of seconds younger
  • Method Details

    • getInterval

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

      public boolean match(jakarta.mail.Message msg)
      The match method.
      Specified by:
      match in class jakarta.mail.search.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(Object obj)
      Equality comparison.
      Overrides:
      equals in class Object
    • hashCode

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