public final class RecipientStringTerm extends AddressStringTerm
Note that this class differs from the RecipientTerm
class
in that this class does comparisons on address strings rather than Address
objects. The string comparisons are case-insensitive.
Constructor and Description |
---|
RecipientStringTerm(Message.RecipientType type,
java.lang.String pattern)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Equality comparison.
|
Message.RecipientType |
getRecipientType()
Return the type of recipient to match with.
|
int |
hashCode()
Compute a hashCode for this object.
|
boolean |
match(Message msg)
Check whether the address specified in the constructor is
a substring of the recipient address of this Message.
|
getIgnoreCase, getPattern
public RecipientStringTerm(Message.RecipientType type, java.lang.String pattern)
type
- the recipient typepattern
- the address pattern to be compared.public Message.RecipientType getRecipientType()
public boolean match(Message msg)
match
in class SearchTerm
msg
- The comparison is applied to this Message's recipient
address.public boolean equals(java.lang.Object obj)
equals
in class AddressStringTerm
public int hashCode()
hashCode
in class StringTerm
Copyright © 2010 - 2020 Adobe. All Rights Reserved