1 21 22 27 28 package javax.mail.search; 29 30 import javax.mail.Address ; 31 32 38 39 public abstract class AddressTerm extends SearchTerm { 40 45 protected Address address; 46 47 private static final long serialVersionUID = 2005405551929769980L; 48 49 protected AddressTerm(Address address) { 50 this.address = address; 51 } 52 53 56 public Address getAddress() { 57 return address; 58 } 59 60 63 protected boolean match(Address a) { 64 return (a.equals(address)); 65 } 66 67 70 public boolean equals(Object obj) { 71 if (!(obj instanceof AddressTerm )) 72 return false; 73 AddressTerm at = (AddressTerm )obj; 74 return at.address.equals(this.address); 75 } 76 77 80 public int hashCode() { 81 return address.hashCode(); 82 } 83 } 84 | Popular Tags |