|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IndexedVertexIterator is an interface that has all the functionality of IndexedIterator as well as VertexIterator. It also adds the methods getVertexAt and deleteVertexAt.
Method Summary | |
boolean |
deleteVertexAt(int index)
Delete the Vertex that has the given index from this iterator and from the graph. |
Vertex |
getVertexAt(int index)
Retrieves the Vertex at the given index. |
Methods inherited from interface byucc.jhdl.synth.graph.IndexedIterator |
deleteEltAt, getEltAt, moveTo, size |
Methods inherited from interface byucc.jhdl.synth.graph.GenericIterator |
deleteElt, first, getElt, isValid, last, moveTo, next, prev |
Methods inherited from interface byucc.jhdl.synth.graph.VertexIterator |
deleteVertex, getVertex |
Method Detail |
public Vertex getVertexAt(int index)
index
- an index in the range of 0 <= index < size()
public boolean deleteVertexAt(int index)
This method must delete the Vertex at index from its graph as well as from this iterator. (deleteEltAt must delete the vertex from the iterator but may or may not delete it from the graph depending on the implementation. The behavior should be documented in the implementing class.)
After calling delete, this iterator's current "pointer" will not be moved. That is, if the object being deleted is not the "current" object then the pointer will still be pointing to the same element it was before the delete. If, however, the current object is deleted then the 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.
index
- the index of an element in the series to delete,
index should be in the range 0 <= index < size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |