Top Description Fields Constructors Methods
javax.mail.search

public final Class FlagTerm

extends SearchTerm
Class Inheritance
Imports
javax.mail.*

This class implements comparisons for Message Flags.
Authors
Bill Shannon, John Mani

Field Summary

Modifier and TypeField and Description
private Flags
flags

Flags object containing the flags to test.

private static final long
private boolean
set

Indicates whether to test for the presence or absence of the specified Flag.

Constructor Summary

AccessConstructor and Description
public
FlagTerm(Flags
Flags object containing the flags to check for
flags
,
boolean
the flag setting to check for
set
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Equality comparison.
public Flags

Returns:

the flags
getFlags
()

Return the Flags to test.

public boolean

Returns:

true if testing whether the flags are set
getTestSet
()

Return true if testing whether the flags are set.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Compute a hashCode for this object.
public boolean

Returns:

true if the comparson succeeds, otherwise false.
match
(Message
The flag comparison is applied to this Message
msg
)

Implements abstract javax.mail.search.SearchTerm.match.

The comparison method.

Field Detail

flagsback to summary
private Flags flags

Flags object containing the flags to test.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.mail.search.SearchTerm.serialVersionUID.

setback to summary
private 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.

Constructor Detail

FlagTermback to summary
public FlagTerm(Flags flags, boolean set)

Constructor.

Parameters
flags:Flags

Flags object containing the flags to check for

set:boolean

the flag setting to check for

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Equality comparison.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getFlagsback to summary
public Flags getFlags()

Return the Flags to test.

Returns:Flags

the flags

getTestSetback to summary
public boolean getTestSet()

Return true if testing whether the flags are set.

Returns:boolean

true if testing whether the flags are set

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Compute a hashCode for this object.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
matchback to summary
public boolean match(Message msg)

Implements abstract javax.mail.search.SearchTerm.match.

The comparison method.

Parameters
msg:Message

The flag comparison is applied to this Message

Returns:boolean

true if the comparson succeeds, otherwise false.

Annotations
@Override