harpoon.Analysis
Class EdgesIterator

java.lang.Object
  extended by net.cscott.jutil.UnmodifiableIterator
      extended by harpoon.Analysis.EdgesIterator
All Implemented Interfaces:
Iterator

public class EdgesIterator
extends UnmodifiableIterator
implements Iterator

EdgesIterator is a generic iterator for a set of CFGraphable objects.

Version:
$Id: EdgesIterator.java,v 1.6 2004/02/08 03:19:12 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Constructor Summary
EdgesIterator(CFGraphable e)
          Convenience constructor.
EdgesIterator(HCodeElement e, CFGrapher grapher)
          Creates a EdgesIterator for all the edges reachable by recursively traversing the successors of e.
 
Method Summary
 boolean hasNext()
          Checks if the set is empty.
 Object next()
          Returns an CFGraphable if one remains.
 
Methods inherited from class net.cscott.jutil.UnmodifiableIterator
proxy, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
remove
 

Constructor Detail

EdgesIterator

public EdgesIterator(CFGraphable e)
Convenience constructor.


EdgesIterator

public EdgesIterator(HCodeElement e,
                     CFGrapher grapher)
Creates a EdgesIterator for all the edges reachable by recursively traversing the successors of e. Predecessors are not included in the set.

Method Detail

hasNext

public boolean hasNext()
Checks if the set is empty.
effects: returns true if more CFGraphable remain in the set. Else returns false.

Specified by:
hasNext in interface Iterator
Specified by:
hasNext in class UnmodifiableIterator

next

public Object next()
Returns an CFGraphable if one remains.
requires: this.hasNext() == true.
effects: returns an CFGraphable from the set contained in this and removes it from the set.

Specified by:
next in interface Iterator
Specified by:
next in class UnmodifiableIterator