public final class Utility
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
Utility.Condition |
This interface defines the test to be executed in
toMessageSet() . |
Modifier and Type | Method | Description |
---|---|---|
static com.sun.mail.imap.protocol.UIDSet[] |
getResyncUIDSet(ResyncData rd) |
Make the ResyncData UIDSet available to IMAPProtocol,
which is in a different package.
|
static com.sun.mail.imap.protocol.MessageSet[] |
toMessageSet(javax.mail.Message[] msgs,
Utility.Condition cond) |
Run thru the given array of messages, apply the given
Condition on each message and generate sets of contiguous
sequence-numbers for the successful messages.
|
static com.sun.mail.imap.protocol.MessageSet[] |
toMessageSetSorted(javax.mail.Message[] msgs,
Utility.Condition cond) |
Sort (a copy of) the given array of messages and then
run thru the sorted array of messages, apply the given
Condition on each message and generate sets of contiguous
sequence-numbers for the successful messages.
|
static com.sun.mail.imap.protocol.UIDSet[] |
toUIDSet(javax.mail.Message[] msgs) |
Return UIDSets for the messages.
|
public static com.sun.mail.imap.protocol.MessageSet[] toMessageSet(javax.mail.Message[] msgs, Utility.Condition cond)
msgs
- the messagescond
- the condition to checkpublic static com.sun.mail.imap.protocol.MessageSet[] toMessageSetSorted(javax.mail.Message[] msgs, Utility.Condition cond)
msgs
- the messagescond
- the condition to checkpublic static com.sun.mail.imap.protocol.UIDSet[] toUIDSet(javax.mail.Message[] msgs)
msgs
- the messagespublic static com.sun.mail.imap.protocol.UIDSet[] getResyncUIDSet(ResyncData rd)
rd
- the ResyncData