javax.mail.search
Class FlagTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.FlagTerm
All Implemented Interfaces:
Serializable

public final class FlagTerm
extends SearchTerm

Term for matching message Flags.

Version:
$Rev: 593593 $ $Date: 2007-11-09 12:04:20 -0500 (Fri, 09 Nov 2007) $
See Also:
Serialized Form

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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

set

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


flags

protected Flags flags
The flags to test.

Constructor Detail

FlagTerm

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

getFlags

public Flags getFlags()

getTestSet

public boolean getTestSet()

match

public boolean match(Message message)
Description copied from class: SearchTerm
Checks a matching criteria defined by the concrete subclass of this Term.

Specified by:
match in class SearchTerm
Parameters:
message - the message to apply the matching criteria to
Returns:
true if the matching criteria is met

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.