Package javax.mail.search
Class FlagTerm
- java.lang.Object
-
- javax.mail.search.SearchTerm
-
- javax.mail.search.FlagTerm
-
- All Implemented Interfaces:
java.io.Serializable
public final class FlagTerm extends SearchTerm
This class implements comparisons for Message Flags.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private FlagsflagsFlags object containing the flags to test.private static longserialVersionUIDprivate booleansetIndicates whether to test for the presence or absence of the specified Flag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Equality comparison.FlagsgetFlags()Return the Flags to test.booleangetTestSet()Return true if testing whether the flags are set.inthashCode()Compute a hashCode for this object.booleanmatch(Message msg)The comparison method.
-
-
-
Field Detail
-
set
private boolean set
Indicates whether to test for the presence or absence of the specified Flag. Iftrue, then test whether all the specified flags are present, else test whether all the specified flags are absent.
-
flags
private Flags flags
Flags object containing the flags to test.
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlagTerm
public FlagTerm(Flags flags, boolean set)
Constructor.- Parameters:
flags- Flags object containing the flags to check forset- the flag setting to check for
-
-
Method Detail
-
getFlags
public Flags getFlags()
Return the Flags to test.- Returns:
- the flags
-
getTestSet
public boolean getTestSet()
Return true if testing whether the flags are set.- Returns:
- true if testing whether the flags are set
-
match
public boolean match(Message msg)
The comparison method.- Specified by:
matchin classSearchTerm- Parameters:
msg- The flag comparison is applied to this Message- Returns:
- true if the comparson succeeds, otherwise false.
-
equals
public boolean equals(java.lang.Object obj)
Equality comparison.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Compute a hashCode for this object.- Overrides:
hashCodein classjava.lang.Object
-
-