net.walend.digraph
Class AbstractMatrixUEDigraph.MatrixEdgeIterator

java.lang.Object
  |
  +--net.walend.digraph.AbstractMatrixUEDigraph.MatrixEdgeIterator
All Implemented Interfaces:
EdgeIterator, EdgeNodeIterator
Enclosing class:
AbstractMatrixUEDigraph

protected class AbstractMatrixUEDigraph.MatrixEdgeIterator
extends java.lang.Object
implements EdgeIterator


Field Summary
private  int i
           
private  int j
           
 
Constructor Summary
protected AbstractMatrixUEDigraph.MatrixEdgeIterator()
           
 
Method Summary
 java.lang.Object edge()
          Returns the current edge.
 java.lang.Object fromNode()
          Returns the node that his edge begins at.
 boolean hasNext()
          Returns true if there are more edges in this iterator.
 void next()
          Advances to the next edge in the iterator.
 void remove()
          Removes the current edge from the digraph.
 java.lang.Object toNode()
          Returns the node that this edge reaches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

i

private int i

j

private int j
Constructor Detail

AbstractMatrixUEDigraph.MatrixEdgeIterator

protected AbstractMatrixUEDigraph.MatrixEdgeIterator()
Method Detail

hasNext

public boolean hasNext()
Returns true if there are more edges in this iterator.

Specified by:
hasNext in interface EdgeNodeIterator

next

public void next()
Advances to the next edge in the iterator.

Specified by:
next in interface EdgeNodeIterator
Throws:
java.util.NoSuchElementException - if the iterator has nothing left.

remove

public void remove()
Removes the current edge from the digraph.

Specified by:
remove in interface EdgeNodeIterator
Throws:
java.lang.UnsupportedOperationException - if the digraph is immutable.
java.lang.IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.

fromNode

public java.lang.Object fromNode()
Returns the node that his edge begins at.

Specified by:
fromNode in interface EdgeNodeIterator
Throws:
java.lang.IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.

toNode

public java.lang.Object toNode()
Returns the node that this edge reaches.

Specified by:
toNode in interface EdgeNodeIterator
Throws:
java.lang.IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.

edge

public java.lang.Object edge()
Description copied from interface: EdgeIterator
Returns the current edge.

Specified by:
edge in interface EdgeIterator


Copyright (c) 2001, 2002, David Walend