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