SK.gnome.dwarf.mail.store.search
Class FlagKey

java.lang.Object
  extended bySK.gnome.dwarf.mail.store.search.SearchKey
      extended bySK.gnome.dwarf.mail.store.search.FlagKey

public class FlagKey
extends SearchKey

This key matches the given flag and the actual message flag.


Field Summary
protected  MailFlag flag
          The matched flag.
static int SET
          This key type specifies that a flag which is set will be matched.
static int UNSET
          This key type specifies that a flag which is not set will be matched.
 
Fields inherited from class SK.gnome.dwarf.mail.store.search.SearchKey
type
 
Constructor Summary
FlagKey(int type, MailFlag flag)
          Creates a new FlagKey.
 
Method Summary
 MailFlag getFlag()
          Returns the matched flag.
 boolean match(MailMessage message)
          Matches the given flag and the actual message flag.
 java.lang.String toString()
          Returns the string represenation of the key.
 
Methods inherited from class SK.gnome.dwarf.mail.store.search.SearchKey
addError, clearErrors, getErrors, getType, hasError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SET

public static final int SET
This key type specifies that a flag which is set will be matched.

See Also:
Constant Field Values

UNSET

public static final int UNSET
This key type specifies that a flag which is not set will be matched.

See Also:
Constant Field Values

flag

protected MailFlag flag
The matched flag.

Constructor Detail

FlagKey

public FlagKey(int type,
               MailFlag flag)
Creates a new FlagKey.

Parameters:
type - the key type
flag - the matched flag
Method Detail

getFlag

public MailFlag getFlag()
Returns the matched flag.

Returns:
the flag

match

public boolean match(MailMessage message)
              throws MailException
Matches the given flag and the actual message flag.

Specified by:
match in class SearchKey
Parameters:
message - the searched message
Returns:
true if the given key criteria and message matches, false otherwise
Throws:
MailException - if an error occurs

toString

public java.lang.String toString()
Description copied from class: SearchKey
Returns the string represenation of the key.

Overrides:
toString in class SearchKey
Returns:
the key string


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.