byucc.jhdl.synth.graph
Interface VertexIterator

All Superinterfaces:
GenericIterator
All Known Subinterfaces:
IndexedVertexIterator
All Known Implementing Classes:
VertexVectorIterator

public interface VertexIterator
extends GenericIterator

An interface that allows iteration of Vertex objects. This interface extends the GenericIterator interface and adds two methods:

  1. getVertex() is a convenience method which saves the user from having to cast the return value of getElt as a Vertex.
  2. deleteVertex() is more than a convenient wrapper for deleteElt. deleteVertex() will delete a vertex from the graph as well as deleting it from the current iterator. (deleteElt may only delete it from the iterator, this will depend on the implementation)

      Author:
      Carl Worth

      Method Summary
       boolean deleteVertex()
                Delete the Vertex currently pointed at by the iterator.
       Vertex getVertex()
                Get the Vertex at which the Iterator currently points.
       
      Methods inherited from interface byucc.jhdl.synth.graph.GenericIterator
      deleteElt, first, getElt, isValid, last, moveTo, next, prev
       

      Method Detail

      getVertex

      public Vertex getVertex()
      Get the Vertex at which the Iterator currently points. This can be implemented as a convenience method that casts the return value of getElt as a Vertex.

      Returns:
      the current Vertex

      deleteVertex

      public boolean deleteVertex()
      Delete the Vertex currently pointed at by the iterator. This call will remove the current Vertex from its graph as well as from this iterator's series of elements.

      After calling delete, this iterator's current "pointer" will be at an undefined position, (it may even be invalid). However, calling next() will move it to the element originally after the deleted element and calling prev() will move it to the element originally before element.

      Also Note: Any modifications of the series of elements, (ie. deletes or modifications), other than through this iterator may cause undefined effects on the state of this iterator.

      Returns:
      true if the object was deleted false if the current pointer is not valid.


      Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.