|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.synth.graph.VectorIterator
byucc.jhdl.synth.graph.EdgeIterator
A class to allow a GenericIterator for Edge objects in an EdgeVector. This class simply extends VectorIterator. The constructor guarantees that this will only be constructed with an EdgeVector. The method getEdge is also added to avoid the cast from getElt.
Constructor Summary | |
EdgeIterator(EdgeVector edges)
Construct a new EdgeIterator from an existing EdgeVector. |
Method Summary | |
boolean |
deleteEdge()
Delete the Edge currently pointed at by the iterator. |
boolean |
deleteEdgeAt(int index)
Delete the edge that has the given index |
boolean |
deleteElt()
Delete the object currently pointed at by the iterator. |
boolean |
deleteEltAt(int index)
Delete the Edge that has the given index. |
Edge |
getEdge()
Get the Edge at which the Iterator currently points. |
Edge |
getEdgeAt(int index)
Get the Edge that has the given index. |
Methods inherited from class byucc.jhdl.synth.graph.VectorIterator |
first, getElt, getEltAt, isValid, last, moveTo, moveTo, next, prev, size, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EdgeIterator(EdgeVector edges)
Method Detail |
public Edge getEdge()
public Edge getEdgeAt(int index)
index
- an index in the range of 0 <= index < size()
public boolean deleteElt()
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.
deleteElt
in interface GenericIterator
deleteElt
in class VectorIterator
public boolean deleteEltAt(int index)
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.
deleteEltAt
in interface IndexedIterator
deleteEltAt
in class VectorIterator
index
- the index of an element in the series to delete,
index should be in the range 0 <= index < size()
public boolean deleteEdge()
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.
deleteElt
public boolean deleteEdgeAt(int index)
This methid is the same as deleteEltAt. I'm including it here to maintain naming consistencies. (ie. getElt & getEdge, deleteElt, & deleteEdge etc.)
index
- the index of the edge to delete
index should be in the range 0 <= index < size()
deleteEltAt
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |