public interface QuestionList extends OsidList
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()); }
Modifier and Type | Method and Description |
---|---|
Question |
getNextQuestion()
Gets the next
Question in this list. |
Question[] |
getNextQuestions(long n)
Gets the next set of
Question elements in this list
which must be less than or equal to the number returned from
available(). |
Question getNextQuestion() throws OperationFailedException
Question
in this list. Question
in this list. The
hasNext()
method should be used to test that a next
Question
is available before calling this
method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Question[] getNextQuestions(long n) throws OperationFailedException
Question
elements in this list
which must be less than or equal to the number returned from
available().
n
- the number of Question
elements requested
which should be less than or equal to available()
Question
elements.
The length of the array is less than or equal to the number
specified.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented.