net.walend.digraph.path
Class AbstractDelegateDigraphOfGEPaths.DigraphGEPath.PathEdgeNodeIterator

java.lang.Object
  |
  +--net.walend.digraph.path.AbstractDelegateDigraphOfGEPaths.DigraphGEPath.PathEdgeNodeIterator
All Implemented Interfaces:
EdgeNodeIterator
Enclosing class:
AbstractDelegateDigraphOfGEPaths.DigraphGEPath

protected class AbstractDelegateDigraphOfGEPaths.DigraphGEPath.PathEdgeNodeIterator
extends java.lang.Object
implements EdgeNodeIterator


Field Summary
private  java.lang.Object fromNode
           
private  boolean nextCalled
           
private  int tailIndex
           
private  java.lang.Object tailNode
           
private  java.lang.Object toNode
           
 
Constructor Summary
protected AbstractDelegateDigraphOfGEPaths.DigraphGEPath.PathEdgeNodeIterator(java.lang.Object headNode, java.lang.Object tailNode)
           
 
Method Summary
private  void checkNextCalled()
           
 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

fromNode

private java.lang.Object fromNode

toNode

private java.lang.Object toNode

tailNode

private java.lang.Object tailNode

nextCalled

private boolean nextCalled

tailIndex

private int tailIndex
Constructor Detail

AbstractDelegateDigraphOfGEPaths.DigraphGEPath.PathEdgeNodeIterator

protected AbstractDelegateDigraphOfGEPaths.DigraphGEPath.PathEdgeNodeIterator(java.lang.Object headNode,
                                                                              java.lang.Object tailNode)
                                                                       throws NodeMissingException
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.

checkNextCalled

private void checkNextCalled()

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.


Copyright (c) 2001, 2002, David Walend