OSID Logo
OSID Specifications
ontology package
Version 3.1.0
Interfaceosid.ontology.OntologyNodeList
Implementsosid.OsidList
Used Byosid.ontology.OntologyNode
Description

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

while (onl.hasNext()) {
     OntologyNode node = onl.getNextOntologyNode();
}
                
or
while (onl.hasNext()) {
     OntologyNode[] nodes = onl.getNextOntologyNodes(onl.available());
}
                
MethodgetNextOntologyNode
Description

Gets the next OntologyNode in this list.

Returnosid.ontology.OntologyNode the next OntologyNode in this list. The hasNext() method should be used to test that a next OntologyNode is available before calling this method.
ErrorsILLEGAL_STATE no more elements available in this list
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetNextOntologyNodes
Description

Gets the next set of OntologyNode elements in this list which must be less than or equal to the return from available().

Parameterscardinaln the number of OntologyNode elements requested which must be less than or equal to available()
Returnosid.ontology.OntologyNode[] an array of OntologyNode elements. The length of the array is less than or equal to the number specified.
ErrorsILLEGAL_STATE no more elements available in this list
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.