OSID Logo
OSID Specifications
assessment package
Version 3.1.0
Interfaceosid.assessment.QuestionList
Implementsosid.OsidList
Used Byosid.assessment.AssessmentSession
Description

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

while (ql.hasNext()) {
     Question question = ql.getNextQuestion();
}
                
or
while (ql.hasNext()) {
     Question[] question = al.getNextQuestions(ql.available());
}
                
MethodgetNextQuestion
Description

Gets the next Question in this list.

Returnosid.assessment.Question the next Question in this list. The hasNext() method should be used to test that a next Question 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.
MethodgetNextQuestions
Description

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

Parameterscardinaln the number of Question elements requested which should be less than or equal to available()
Returnosid.assessment.Question[] an array of Question 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.