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