MessageSequence class
Defines a list of message IDs.
IDs can be either be based on sequence IDs or on UIDs.
Constructors
- MessageSequence.new({bool isUidSequence = false})
- Creates a new message sequence.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Checks is this sequence has at no elements.
no setter
- isNil → bool
-
no setter
- isNotEmpty → bool
-
Checks is this sequence has at least one element.
no setter
- isUidSequence → bool
-
True when this sequence is consisting of UIDs
final
- length → int
-
The length of this sequence - only valid when there is no range to last involved.
no setter
- RANGESTAR → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- STAR → int
-
final
Methods
-
add(
int id) → void - Adds the specified ID
-
addAll(
) → void - Adds all messages
-
addLast(
) → void -
Adds the last element, which is alway
*
. -
addList(
List< int> ids) → void - Adds a user defined sequence of IDs
-
addMessage(
MimeMessage message) → void -
Adds the UID or sequence ID of the
message
to this sequence. -
addRange(
int start, int end) → void -
Adds all messages between
start
andend
inclusive. -
addRangeToLast(
int start) → void -
Adds a range from the specified
start
ID towards to the last*
element. -
addSequenceId(
MimeMessage message) → void -
Adds the sequence ID of the specified
message
. -
addUid(
MimeMessage message) → void -
Adds the UID of the specified
message
. -
containsLast(
) → bool - Checks if this sequence contains the last indicator in some form - '*'
-
elementAt(
int index) → int -
Retrieves the ID at the specified zero-based
index
. -
every(
) → Iterable< int> - Iterates through the sequence
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
int id) → void -
removeMessage(
MimeMessage message) → void -
Removes the UID or sequence ID of the
message
to this sequence. -
removeSequenceId(
MimeMessage message) → void -
Removes the sequence ID of the specified
message
. -
removeUid(
MimeMessage message) → void -
Remoces the UID of the specified
message
. -
render(
StringBuffer buffer) → void -
Renders this message sequence into the specified StringBuffer
buffer
. -
sort(
) → void - Sorts the sequence set.
-
subsequence(
int start, [int? end]) → MessageSequence -
Creates a new sequence containing the message IDs/UIDs between
start
(inclusive) andend
(exclusive) -
subsequenceFromPage(
int pageNumber, int pageSize, {int skip = 0}) → MessageSequence -
Retrieves sequence containing the message IDs/UIDs from the page with the given
pageNumber
which starts at 1 and the givenpageSize
. -
toList(
[int? exists]) → List< int> - Lists all entries of this sequence.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromAll(
) → MessageSequence - Convenience method for getting the sequence for all messages.
-
fromId(
int id, {bool isUid = false}) → MessageSequence -
Convenience method for getting the sequence for a single
id
. -
fromIds(
List< int> ids, {bool isUid = false}) → MessageSequence -
Convenience method to creating a sequence from a list of
ids
. -
fromLast(
) → MessageSequence - Convenience method for getting the sequence for the last message.
-
fromMessage(
MimeMessage message) → MessageSequence -
Convenience method for getting the sequence for a single
message
's UID or sequence ID. -
fromMessages(
List< MimeMessage> messages) → MessageSequence -
Convenience method for getting the sequence for the given
messages
's UIDs or sequence IDs. -
fromPage(
int page, int pageSize, dynamic messagesExist, {bool isUidSequence = false}) → MessageSequence -
Convenience method for getting the sequence for a range defined by the
page
starting with 1, thepageSize
and the number of messagesmessagesExist
. -
fromRange(
int start, int end, {bool isUidSequence = false}) → MessageSequence -
Convenience method for getting the sequence for a single range from
start
toend
inclusive. -
fromRangeToLast(
int start, {bool isUidSequence = false}) → MessageSequence -
Convenience method for getting the sequence for a single range from
start
to the last message inclusive. -
fromSequenceId(
MimeMessage message) → MessageSequence -
Convenience method for getting the sequence for a single
message
. -
fromUid(
MimeMessage message) → MessageSequence -
Convenience method for getting the sequence for a single
message
's UID. -
parse(
String text, {bool isUidSequence = false}) → MessageSequence -
Generates a sequence based on the specified inpput
text
like1:10,21,73:79
.