net.walend.digraph.path
Class AbstractListGEPath.ListEdgeNodeIterator

java.lang.Object
  |
  +--net.walend.digraph.path.AbstractListGEPath.ListEdgeNodeIterator
All Implemented Interfaces:
EdgeNodeIterator
Enclosing class:
AbstractListGEPath

protected class AbstractListGEPath.ListEdgeNodeIterator
extends java.lang.Object
implements EdgeNodeIterator


Field Summary
private  int expectedModCount
           
private  int index
           
 
Constructor Summary
protected AbstractListGEPath.ListEdgeNodeIterator(int mods)
           
 
Method Summary
private  void checkState()
           
 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()
          Throws an UnsupportedOperationException.
 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

index

private int index

expectedModCount

private int expectedModCount
Constructor Detail

AbstractListGEPath.ListEdgeNodeIterator

protected AbstractListGEPath.ListEdgeNodeIterator(int mods)
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()
Throws an UnsupportedOperationException. Removing a random edge from a path would break the path.

Specified by:
remove in interface EdgeNodeIterator
Throws:
java.lang.UnsupportedOperationException - always.
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.

checkState

private void checkState()

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