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