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