1 21 22 27 28 package javax.mail.search; 29 30 import javax.mail.Message ; 31 32 38 public final class NotTerm extends SearchTerm { 39 44 protected SearchTerm term; 45 46 private static final long serialVersionUID = 7152293214217310216L; 47 48 public NotTerm(SearchTerm t) { 49 term = t; 50 } 51 52 55 public SearchTerm getTerm() { 56 return term; 57 } 58 59 60 public boolean match(Message msg) { 61 return !term.match(msg); 62 } 63 64 67 public boolean equals(Object obj) { 68 if (!(obj instanceof NotTerm )) 69 return false; 70 NotTerm nt = (NotTerm )obj; 71 return nt.term.equals(this.term); 72 } 73 74 77 public int hashCode() { 78 return term.hashCode() << 1; 79 } 80 } 81 | Popular Tags |