Package javax.mail.search
Class FromStringTerm
- java.lang.Object
-
- javax.mail.search.SearchTerm
-
- javax.mail.search.StringTerm
-
- javax.mail.search.AddressStringTerm
-
- javax.mail.search.FromStringTerm
-
- All Implemented Interfaces:
java.io.Serializable
public final class FromStringTerm extends AddressStringTerm
A string comparison of the From address header.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.mail.search.StringTerm
ignoreCase, pattern
-
-
Constructor Summary
Constructors Constructor Description FromStringTerm(java.lang.String pattern)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
boolean
match(Message msg)
Indicates whether the address pattern specified in the constructor is a substring of the string representation of the From address in the given message.-
Methods inherited from class javax.mail.search.AddressStringTerm
match
-
Methods inherited from class javax.mail.search.StringTerm
getIgnoreCase, getPattern, hashCode, match
-
-
-
-
Method Detail
-
match
public boolean match(Message msg)
Indicates whether the address pattern specified in the constructor is a substring of the string representation of the From address in the given message.- Specified by:
match
in classSearchTerm
- Parameters:
msg
- the message
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classAddressStringTerm
-
-