|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.mail.store.search.SearchKey SK.gnome.dwarf.mail.store.search.DateKey
This key matches the given date/time and the message's date/time.
Field Summary | |
static int |
BEFORE
This key type specifies that values before the specified date/time will be matched. |
static int |
ON
This key type specifies that values equal to the specified date/time will be matched. |
static int |
SINCE
This key type specifies that values after the specified date/time will be matched. |
protected long |
time
The matched date/time. |
Fields inherited from class SK.gnome.dwarf.mail.store.search.SearchKey |
type |
Constructor Summary | |
DateKey(int type,
long time)
Creates a new DateKey. |
Method Summary | |
long |
getTime()
Returns the matched date/time. |
protected abstract long |
getTime(MailMessage message)
Returns the message date/time to match the given date/time. |
boolean |
match(MailMessage message)
Matches the given date/time and the message's date/time. |
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 |
public static final int BEFORE
public static final int ON
public static final int SINCE
protected long time
Constructor Detail |
public DateKey(int type, long time)
time
- the matched date/timeMethod Detail |
public long getTime()
public boolean match(MailMessage message) throws MailException
The message date/time is obtained via the abstract getTime(MailMessage)
method.
match
in class SearchKey
message
- the searched message
MailException
- if an error occurspublic java.lang.String toString()
SearchKey
toString
in class SearchKey
protected abstract long getTime(MailMessage message) throws MailException
It may return -1 if the time information could not be obtained from the message.
message
- the searched message
MailException
- if an error occured
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |