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

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

public class NotKey
extends SearchKey

This key modifies the value returned by the given key to its logical opposit.


Field Summary
protected  SearchKey key
          The modified key.
 
Fields inherited from class SK.gnome.dwarf.mail.store.search.SearchKey
type
 
Constructor Summary
NotKey(SearchKey key)
          Creates a new NotKey.
 
Method Summary
 SearchKey getKey()
          Returns the modified key.
 boolean match(MailMessage message)
          Matches the given message.
 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

key

protected SearchKey key
The modified key.

Constructor Detail

NotKey

public NotKey(SearchKey key)
Creates a new NotKey.

Parameters:
key - the modified key
Method Detail

getKey

public SearchKey getKey()
Returns the modified key.

Returns:
the key

match

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

It returns the value of key's match method modified with the logical NOT operator.

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.