net.walend.measured
Class CEBellmanFordTest.BFCEDigraph.WrappingEdgeIterator

java.lang.Object
  |
  +--net.walend.measured.CEBellmanFordTest.BFCEDigraph.WrappingEdgeIterator
All Implemented Interfaces:
EdgeIterator, EdgeNodeIterator, IndexedEdgeIterator, IndexedEdgeNodeIterator
Enclosing class:
CEBellmanFordTest.BFCEDigraph

private class CEBellmanFordTest.BFCEDigraph.WrappingEdgeIterator
extends java.lang.Object
implements IndexedEdgeIterator


Field Summary
private  java.lang.Object edge
           
private  IndexedEdgeIterator edgeIterator
           
private  int fromIndex
           
private  java.lang.Object fromNode
           
private  boolean nextCalled
           
private  IndexedIterator nodeIterator
           
private  int toIndex
           
private  java.lang.Object toNode
           
 
Constructor Summary
protected CEBellmanFordTest.BFCEDigraph.WrappingEdgeIterator()
           
 
Method Summary
private  void checkState()
           
 java.lang.Object edge()
          Returns the current edge.
 int fromIndex()
          Returns the index of the node that his edge begins at.
 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.
 int toIndex()
          Returns the index of the node that this edge reaches.
 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

edgeIterator

private IndexedEdgeIterator edgeIterator

nodeIterator

private IndexedIterator nodeIterator

fromNode

private java.lang.Object fromNode

fromIndex

private int fromIndex

toNode

private java.lang.Object toNode

toIndex

private int toIndex

edge

private java.lang.Object edge

nextCalled

private boolean nextCalled
Constructor Detail

CEBellmanFordTest.BFCEDigraph.WrappingEdgeIterator

protected CEBellmanFordTest.BFCEDigraph.WrappingEdgeIterator()
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.

checkState

private void checkState()

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.

fromIndex

public int fromIndex()
Description copied from interface: IndexedEdgeNodeIterator
Returns the index of the node that his edge begins at.

Specified by:
fromIndex in interface IndexedEdgeNodeIterator

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.

toIndex

public int toIndex()
Description copied from interface: IndexedEdgeNodeIterator
Returns the index of the node that this edge reaches.

Specified by:
toIndex in interface IndexedEdgeNodeIterator

edge

public java.lang.Object edge()
Returns the current edge.

Specified by:
edge in interface EdgeIterator
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.


Copyright (c) 2001, 2002, David Walend