nz.ac.waikato.jdsl.graph.api
Interface EdgeIterator
- All Superinterfaces:
- ObjectIterator, PositionIterator
- All Known Implementing Classes:
- EdgeIteratorAdapter
public interface EdgeIterator
- extends PositionIterator
Iterator over a set of edges. No order of the edges is required
by this interface, although order may be promised or required
by users of the interface. Conceptually, the iterator starts out
positioned before the first edge to be considered. With each call
to next(), the iterator skips over another edge and returns the edge
skipped over, until the iterator is positioned past the last edge.
Note that NoSuchElementException
indicates two
different failure states: when the iterator is positioned before
the first edge, edge() and element() fail; when the iterator is
positioned after the last edge, next() fails.
- Version:
- JDSL 2.1.1
- Author:
- Mark Handy
nextEdge
Edge nextEdge()
throws java.util.NoSuchElementException
- Returns:
- Next edge to consider
- Throws:
java.util.NoSuchElementException
- if iterator has moved past
the last edge to be seen
edge
Edge edge()
throws java.util.NoSuchElementException
- Returns:
- The edge returned by the most recent next()
- Throws:
java.util.NoSuchElementException
- When the iterator is in its
initial, before-the-first-edge state
Copyright © 2009 ModelJUnit Project. All Rights Reserved.