javax.mail.search

Class FlagTerm

public final class FlagTerm extends SearchTerm

A comparison of message flags.

Version: 1.3

Author: Chris Burdess

Field Summary
protected Flagsflags
The flags to test.
protected booleanset
Indicates whether to test for the presence or absence of the specified flag.
Constructor Summary
FlagTerm(Flags flags, boolean set)
Constructor.
Method Summary
booleanequals(Object other)
FlagsgetFlags()
Returns the flags to test.
booleangetTestSet()
Indicates whether to test for the presence or the absence of the specified flags.
inthashCode()
booleanmatch(Message msg)
Returns true if the flags in the specified message match this term.

Field Detail

flags

protected Flags flags
The flags to test.

set

protected boolean set
Indicates whether to test for the presence or absence of the specified flag. If true, test whether all the specified flags are present, otherwise test whether all the specified flags are absent.

Constructor Detail

FlagTerm

public FlagTerm(Flags flags, boolean set)
Constructor.

Parameters: flags the flags to test set whether to test for presence or absence of the specified flags

Method Detail

equals

public boolean equals(Object other)

getFlags

public Flags getFlags()
Returns the flags to test.

getTestSet

public boolean getTestSet()
Indicates whether to test for the presence or the absence of the specified flags.

hashCode

public int hashCode()

match

public boolean match(Message msg)
Returns true if the flags in the specified message match this term.
©