OSID Logo
OSID Specifications
topology package
Version 3.0.0
Release Candidate Preview
Interfaceosid.topology.NodeList
Implementsosid.OsidList
Description

Like all OsidLists, NodeList provides a means for accessing Node elements sequentially either one at a time or many at a time. Examples:

                     
                     
                     while (nl.hasNext()) {
                          Node node = nl.getNextNode();
                     }
                     
                                 
                     
                
or
                     
                     
                     while (nl.hasNext()) {
                          Node[] nodes = nl.getNextNodes(nl.available());
                     }
                     
                                 
                     
                
MethodgetNextNode
Description

Gets the next Node in this list.

Returnosid.topology.Nodethe next Node in this list. The hasNext() method should be used to test that a next Node is available before calling this method.
ErrorsILLEGAL_STATEno more elements available in this list
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetNextNodes
Description

Gets the next set of Node elements in this list. The specified amount must be less than or equal to the return from available().

Parameterscardinalnthe number of Node elements requested which must be less than or equal to available()
Returnosid.topology.Node[]an array of Node elements. The length of the array is less than or equal to the number specified.
ErrorsILLEGAL_STATEno more elements available in this list
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.