de.grogra.xl.impl.base
public abstract class EdgeIterator extends java.lang.Object
EdgeIterator is used to iterate over the edges
of a node. It is obtained by Graph#createEdgeIterator
and used in the following way:
for (EdgeIterator i = graph.createEdgeIterator (node); i.hasEdge ();
i.moveToNext ())
{
// i.source contains the source node, i.target the target node,
// i.edgeBits the edge bits of the current edge
...
}
| Modifier and Type | Field and Description |
|---|---|
int |
edgeBits
Contains the edge bits of the current edge.
|
java.lang.Object |
source
Contains the source node of the current edge.
|
java.lang.Object |
target
Contains the target node of the current edge.
|
| Constructor and Description |
|---|
EdgeIterator() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
dispose() |
abstract boolean |
hasEdge()
|
abstract void |
moveToNext()
Moves the iterator to the next edge.
|
public int edgeBits
public java.lang.Object source
public java.lang.Object target
public abstract void dispose()
public abstract boolean hasEdge()
true if the fields source, target
and edgeBits contain a valid edge. Otherwise, it has been
iterated over all edges of the node, and this method returns
false. Then, further use of this
edge iterator is not allowed; the iterator may be re-used by
implementations of Graph.true iff this iterator contains a valid edgepublic abstract void moveToNext()