javax.mail.search
Class FlagTerm
- Serializable
public final class FlagTerm
 This class implements comparisons for Message Flags.
| 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.
 | 
|  boolean | equals(Object other) Equality comparison.
 | 
|  Flags | getFlags() Return the Flags to test.
 | 
|  boolean | getTestSet() Return true if testing whether the flags are set.
 | 
|  int | hashCode() Compute a hashCode for this object.
 | 
|  boolean | match(Message msg) The comparison method.
 | 
flags
protected Flags flags
 Flags object containing the flags to test.
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.
FlagTerm
public FlagTerm(Flags flags,
                boolean set) Constructor.
- flags- Flags object containing the flags to check for
- set- the flag setting to check for
equals
public boolean equals(Object other)
 Equality comparison.
getFlags
public Flags getFlags()
 Return the Flags to test.
getTestSet
public boolean getTestSet()
 Return true if testing whether the flags are set.
hashCode
public int hashCode()
 Compute a hashCode for this object.
match
public boolean match(Message msg)
 The comparison method.
- match in interface SearchTerm
- msg- The flag comparison is applied to this Message
- true if the comparson succeeds, otherwise false.