public interface GradeList extends OsidList
Like all OsidLists,
GradeList
provides a
means for accessing Grade
elements sequentially either one
at a time or many at a time. Examples:
while (gl.hasNext()) { Grade grade = gl.getNextGrade(); }or
while (gl.hasNext()) { Grade[] grades = gl.getNextGrades(gl.available()); }
Modifier and Type | Method and Description |
---|---|
Grade |
getNextGrade()
Gets the next
Grade in this list. |
Grade[] |
getNextGrades(long n)
Gets the next set of
Grade elements in this list which
must be less than or equal to the return from available(). |
Grade getNextGrade() throws OperationFailedException
Grade
in this list. Grade
in this list. The
hasNext()
method should be used to test that a next
Grade
is available before calling this method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Grade[] getNextGrades(long n) throws OperationFailedException
Grade
elements in this list which
must be less than or equal to the return from available().
n
- the number of Grade
elements requested which
must be less than or equal to available()
Grade
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.