Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Equality comparison.
if (!(obj instanceof RecipientStringTerm))
return false;
RecipientStringTerm rst = (RecipientStringTerm)obj;
return rst.type.equals(this.type) && super.equals(obj);
|
public javax.mail.Message$RecipientType | getRecipientType()Return the type of recipient to match with.
return type;
|
public int | hashCode()Compute a hashCode for this object.
return type.hashCode() + super.hashCode();
|
public boolean | match(javax.mail.Message msg)Check whether the address specified in the constructor is
a substring of the recipient address of this Message.
Address[] recipients;
try {
recipients = msg.getRecipients(type);
} catch (Exception e) {
return false;
}
if (recipients == null)
return false;
for (int i=0; i < recipients.length; i++)
if (super.match(recipients[i]))
return true;
return false;
|