public interface MessageList extends OsidList
Like all OsidLists,
MessageList
provides
a means for accessing Message
elements sequentially either
one at a time or many at a time. Examples:
while (ml.hasNext()) { Message message = ml.getNextMessage(); }or
while (ml.hasNext()) { Message[] messages = ml.getNextMessages(ml.available()); }
Modifier and Type | Method and Description |
---|---|
Message |
getNextMessage()
Gets the next
Message in this list. |
Message[] |
getNextMessages(long n)
Gets the next set of
Messages in this list which must
be less than or equal to the return from available(). |
Message getNextMessage() throws OperationFailedException
Message
in this list. Message
in this list. The
hasNext()
method should be used to test that a next
Message
is available before calling this
method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Message[] getNextMessages(long n) throws OperationFailedException
Messages
in this list which must
be less than or equal to the return from available().
n
- the number of Message
elements requested
which must be less than or equal to available()
Message
elements.
The length of the array is less than or equal to the number
specified.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented.