public interface ItemPeerList extends OsidList
Like all OsidLists,
ItemPeerList
provides
a means for accessing ItemPeer
elements sequentially either
one at a time or many at a time. Examples:
while (ipl.hasNext()) { ItemPeer peer = ipl.getNextItemPeer(); }or
while (ipl.hasNext()) { ItemPeer[] peers = ipl.getNextItemPeers(ipl.available()); }
Modifier and Type | Method and Description |
---|---|
ItemPeer |
getNextItemPeer()
Gets the next
ItemPeer in this list. |
ItemPeer[] |
getNextItemPeers(long n)
Gets the next set of
ItemPeer elements in this list. |
ItemPeer getNextItemPeer() throws OperationFailedException
ItemPeer
in this list. ItemPeer
in this list. The
hasNext()
method should be used to test that a next
ItemPeer
is available before calling this
method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. ItemPeer[] getNextItemPeers(long n) throws OperationFailedException
ItemPeer
elements in this list.
The specified amount must be less than or equal to the return from
available().
n
- the number of ItemPeer
elements requested
which must be less than or equal to available()
ItemPeer
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.