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