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