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