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