Interface StockNodeList
- All Superinterfaces:
AutoCloseable, Closeable, OsidList, OsidList
Like all OsidLists , StockNodeList provides a means for
accessing StockNode elements sequentially either one at a time or
many at a time. Examples:
while (snl.hasNext()) {
StockNode node = snl.getNextStockNode();
}
or
while (snl.hasNext()) {
StockNode[] nodes = snl.getNextStockNodes(snl.available());
}
-
Method Details
-
getNextStockNode
Gets the nextStockNodein this list.- Returns:
- the next
StockNodein this list. ThehasNext()method should be used to test that a nextStockNodeis 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.
-
getNextStockNodes
Gets the next set ofStockNodeelements in this list. The specified amount must be less than or equal to the return fromavailable().- Parameters:
n- the number ofStockNodeelements requested which must be less than or equal toavailable()- Returns:
- an array of
StockNodeelements. 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.
-