javax.mail.search
public final class: SubjectTerm [javadoc |
source]
java.lang.Object
javax.mail.search.SearchTerm
javax.mail.search.StringTerm
javax.mail.search.SubjectTerm
All Implemented Interfaces:
Serializable
This class implements comparisons for the Message Subject header.
The comparison is case-insensitive.
- author:
Bill
- Shannon
- author:
John
- Mani
Constructor: |
public SubjectTerm(String pattern) {
// Note: comparison is case-insensitive
super(pattern);
}
Parameters:
pattern - the pattern to search for
|
Method from javax.mail.search.SubjectTerm Summary: |
---|
equals, match |
Methods from javax.mail.search.SearchTerm: |
---|
match |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.mail.search.SubjectTerm Detail: |
public boolean equals(Object obj) {
if (!(obj instanceof SubjectTerm))
return false;
return super.equals(obj);
}
|
public boolean match(Message msg) {
String subj;
try {
subj = msg.getSubject();
} catch (Exception e) {
return false;
}
if (subj == null)
return false;
return super.match(subj);
}
|