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