1 21 22 27 28 package javax.mail.search; 29 30 import java.util.Date ; 31 import javax.mail.Message ; 32 33 39 public final class SentDateTerm extends DateTerm { 40 41 private static final long serialVersionUID = 5647755030530907263L; 42 43 49 public SentDateTerm(int comparison, Date date) { 50 super(comparison, date); 51 } 52 53 60 public boolean match(Message msg) { 61 Date d; 62 63 try { 64 d = msg.getSentDate(); 65 } catch (Exception e) { 66 return false; 67 } 68 69 if (d == null) 70 return false; 71 72 return super.match(d); 73 } 74 75 78 public boolean equals(Object obj) { 79 if (!(obj instanceof SentDateTerm )) 80 return false; 81 return super.equals(obj); 82 } 83 } 84 | Popular Tags |