|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dtw.webmail.model.JwmaMessageInfoListImpl
Class implementing a list for JwmaMessageInfo instances. It has caching functionality, which reduces the need to reconstruct the list after moving and deleting messages.
Field Summary | |
protected boolean |
m_HasDeleted
|
protected int |
m_LastSortCriteria
|
protected java.util.List |
m_MessageInfos
|
Method Summary | |
static JwmaMessageInfoListImpl |
createJwmaMessageInfoListImpl(javax.mail.Folder f)
Factory method that creates a new JwmaMessageInfoListImpl instance wrapping the list of messages in the given folder. |
static JwmaMessageInfoListImpl |
createJwmaMessageInfoListImpl(javax.mail.Message[] messages)
Factory method that creates a new JwmaMessageInfoListImpl instance from the given array of messages. |
int |
getLastSortCriteria()
Returns the last used sort criteria as int. |
int |
getListIndex(int msgnum)
Returns the list index of message given by it's message number. |
int |
getNextMessageNumber(int msgnum)
Returns the message number of the next message in the list, observing the sorting. |
int |
getPreviousMessageNumber(int msgnum)
Returns the message number of the previous message in the list, observing the sorting. |
java.util.Iterator |
iterator()
Returns an Iterator over the JwmaMessageInfoImpl instances contained within this list. |
JwmaMessageInfoImpl[] |
listMessageInfos()
Returns an array of JwmaMessageInfo[] listing the info's stored in this list. |
void |
remove(int[] msgsnums)
Removes the items with the given numbers from this list. |
void |
removeDeleted()
Removes items that are flagged deleted from this list. |
void |
renumber()
Renumbers the items in this list. |
int |
size()
Returns the size of this list. |
void |
sort(int criteria)
Sorts this MessageInfoListImpl by the given criteria. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List m_MessageInfos
protected boolean m_HasDeleted
protected int m_LastSortCriteria
Method Detail |
public int size()
public JwmaMessageInfoImpl[] listMessageInfos()
listMessageInfos()
public void sort(int criteria)
criteria
- the criteria used for sorting.MessageSortCriterias
,
MessageSortingUtil
public int getLastSortCriteria()
public int getNextMessageNumber(int msgnum)
msgnum
- the message number of the message to start from.
public int getPreviousMessageNumber(int msgnum)
msgnum
- the message number of the message to start from.
public int getListIndex(int msgnum)
public java.util.Iterator iterator()
public void remove(int[] msgsnums)
msgsnums
- the numbers of the items to be removed as int[].public void removeDeleted()
public void renumber()
public static JwmaMessageInfoListImpl createJwmaMessageInfoListImpl(javax.mail.Message[] messages) throws JwmaException
messages
- array of javax.mail.Message instances.
JwmaException
- if it fails to build the list.public static JwmaMessageInfoListImpl createJwmaMessageInfoListImpl(javax.mail.Folder f) throws JwmaException
f
- the javax.mail.Folder instance, the new list instance should
be created for.
JwmaException
- if it fails retrieve the list of javax.mail.Message
instances from the folder, or when it fails to build the list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |