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