当前页面:
在线文档首页 >
Java Platform, Enterprise Edition v1.3.1 API Specifications
Java 2 Platform EE v1.3: Class FlagTerm - Java Platform, Enterprise Edition v1.3.1 API Specifications
javax.mail.search
Class FlagTerm
java.lang.Object
|
+--javax.mail.search.SearchTerm
|
+--javax.mail.search.FlagTerm
- public final class FlagTerm
- extends SearchTerm
This class implements comparisons for Message Flags.
Field Summary |
protected Flags |
flags
Flags object containing the flags to test. |
protected boolean |
set
Indicates whether to test for the presence or
absence of the specified Flag. |
Constructor Summary |
FlagTerm(Flags flags,
boolean set)
Constructor. |
Method Summary |
Flags |
getFlags()
Return the Flags to test. |
boolean |
getTestSet()
Return true if testing whether the flags are set. |
boolean |
match(Message msg)
The comparison method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
set
protected boolean set
- Indicates whether to test for the presence or
absence of the specified Flag. If
true
,
then test whether all the specified flags are present, else
test whether all the specified flags are absent.
flags
protected Flags flags
- Flags object containing the flags to test.
FlagTerm
public FlagTerm(Flags flags,
boolean set)
- Constructor.
- Parameters:
flags
- Flags object containing the flags to check forset
- the flag setting to check for
getFlags
public Flags getFlags()
- Return the Flags to test.
getTestSet
public boolean getTestSet()
- Return true if testing whether the flags are set.
match
public boolean match(Message msg)
- The comparison method.
- Overrides:
match
in class SearchTerm
- Parameters:
msg
- The flag comparison is applied to this Message- Returns:
- true if the comparson succeeds, otherwise false.