Interface BinList
- All Superinterfaces:
AutoCloseable, Closeable, OsidList, 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());
}
-
Method Summary
Modifier and TypeMethodDescriptionGets the nextBinin this list.Bin[]getNextBins(long n) Gets the next set ofBinelements in this list which must be less than or equal to the return fromavailable().
-
Method Details
-
getNextBin
Gets the nextBinin this list.- Returns:
- the next
Binin this list. ThehasNext()method should be used to test that a nextBinis available before calling this method. - Throws:
IllegalStateException- no more elements available in this listOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getNextBins
Gets the next set ofBinelements in this list which must be less than or equal to the return fromavailable().- Parameters:
n- the number ofBinelements requested which must be less than or equal toavailable()- Returns:
- an array of
Binelements. The length of the array is less than or equal to the number specified. - Throws:
IllegalStateException- no more elements available in this listOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-