- java.lang.Object
-
- com.sun.mail.imap.protocol.UIDSet
-
public class UIDSet extends java.lang.Object
This class holds the 'start' and 'end' for a range of UIDs. Just like MessageSet except using long instead of int.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UIDSet[]
createUIDSets(long[] uids)
Convert an array of longs into an array of UIDSetsstatic UIDSet[]
parseUIDSets(java.lang.String uids)
Parse a string in IMAP UID range format.long
size()
Count the total number of elements in a UIDSetstatic long
size(UIDSet[] uidset)
Count the total number of elements in an array of UIDSets.static long[]
toArray(UIDSet[] uidset)
Convert an array of UIDSets into a array of long UIDs.static long[]
toArray(UIDSet[] uidset, long uidmax)
Convert an array of UIDSets into a array of long UIDs.static java.lang.String
toString(UIDSet[] uidset)
Convert an array of UIDSets into an IMAP sequence range.
-
-
-
Method Detail
-
size
public long size()
Count the total number of elements in a UIDSet- Returns:
- the number of elements
-
createUIDSets
public static UIDSet[] createUIDSets(long[] uids)
Convert an array of longs into an array of UIDSets- Parameters:
uids
- the UIDs- Returns:
- array of UIDSet objects
-
parseUIDSets
public static UIDSet[] parseUIDSets(java.lang.String uids)
Parse a string in IMAP UID range format.- Parameters:
uids
- UID string- Returns:
- array of UIDSet objects
- Since:
- JavaMail 1.5.1
-
toString
public static java.lang.String toString(UIDSet[] uidset)
Convert an array of UIDSets into an IMAP sequence range.- Parameters:
uidset
- the UIDSets- Returns:
- the IMAP sequence string
-
toArray
public static long[] toArray(UIDSet[] uidset)
Convert an array of UIDSets into a array of long UIDs.- Parameters:
uidset
- the UIDSets- Returns:
- arrray of UIDs
- Since:
- JavaMail 1.5.1
-
toArray
public static long[] toArray(UIDSet[] uidset, long uidmax)
Convert an array of UIDSets into a array of long UIDs. Don't include any UIDs larger than uidmax.- Parameters:
uidset
- the UIDSetsuidmax
- maximum UID- Returns:
- arrray of UIDs
- Since:
- JavaMail 1.5.1
-
size
public static long size(UIDSet[] uidset)
Count the total number of elements in an array of UIDSets.- Parameters:
uidset
- the UIDSets- Returns:
- the number of elements
-
-