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.
ignoreCase, pattern
Constructor and Description |
---|
RecipientStringTerm(Message.RecipientType type,
String pattern)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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.
|
match
getIgnoreCase, getPattern, match
public RecipientStringTerm(Message.RecipientType type, 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(Object obj)
equals
in class AddressStringTerm
public int hashCode()
hashCode
in class StringTerm
Copyright © 2021 JBoss by Red Hat. All rights reserved.