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