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