javax.mail.search

Class FlagTerm

Implemented Interfaces:
Serializable

public final class FlagTerm
extends SearchTerm

Term for matching message Flags.

Field Summary

protected Flags
flags
The flags to test.
protected boolean
set
If true, test that all flags are set; if false, test that all flags are clear.

Constructor Summary

FlagTerm(Flags flags, boolean set)

Method Summary

boolean
equals(Object other)
Flags
getFlags()
boolean
getTestSet()
int
hashCode()
boolean
match(Message message)
Checks a matching criteria defined by the concrete subclass of this Term.

Methods inherited from class javax.mail.search.SearchTerm

match

Field Details

flags

protected Flags flags
The flags to test.

set

protected boolean set
If true, test that all flags are set; if false, test that all flags are clear.

Constructor Details

FlagTerm

public FlagTerm(Flags flags,
                boolean set)
Parameters:
flags - the flags to test
set - test for set or clear; set

Method Details

equals

public boolean equals(Object other)

getFlags

public Flags getFlags()

getTestSet

public boolean getTestSet()

hashCode

public int hashCode()

match

public boolean match(Message message)
Checks a matching criteria defined by the concrete subclass of this Term.
Overrides:
match in interface SearchTerm
Parameters:
message - the message to apply the matching criteria to
Returns:
true if the matching criteria is met