java.lang.Object
com.phoenixst.plexus.operations.Join.TraverserImpl
- All Implemented Interfaces:
- java.util.Iterator, com.phoenixst.plexus.Traverser
- Enclosing class:
- Join
- private class Join.TraverserImpl
- extends java.lang.Object
- implements com.phoenixst.plexus.Traverser
|
Method Summary |
com.phoenixst.plexus.Graph.Edge |
getEdge()
Returns the Edge which was traversed to get to
the last node returned by next() 55 . |
java.lang.Object |
getOtherEndpoint()
Returns the node at the other end of the edge which was
traversed to get to the last node returned by next() 55 . |
boolean |
hasNext()
Tests whether there are elements remaining in the collection. |
java.lang.Object |
next()
Obtain the next element in the collection. |
void |
remove()
Remove from the underlying collection the last element returned by next
(optional operation). |
void |
removeEdge()
Removes from the underlying com.phoenixst.plexus.Graph the
Edge that would be returned by getEdge() 55
(optional operation). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
node
private java.lang.Object node
traverser
private com.phoenixst.plexus.Traverser traverser
nodeIter
private java.util.Iterator nodeIter
edge
private com.phoenixst.plexus.Graph.Edge edge
hasStarted
private boolean hasStarted
Join.TraverserImpl
public Join.TraverserImpl(java.lang.Object node)
hasNext
public boolean hasNext()
- Description copied from interface:
java.util.Iterator
- Tests whether there are elements remaining in the collection. In other
words, calling
next() will not throw an exception.
- Specified by:
hasNext in interface java.util.Iterator
next
public java.lang.Object next()
- Description copied from interface:
java.util.Iterator
- Obtain the next element in the collection.
- Specified by:
next in interface java.util.Iterator
remove
public void remove()
- Description copied from interface:
java.util.Iterator
- Remove from the underlying collection the last element returned by next
(optional operation). This method can be called only once after each
call to
next(). It does not affect what will be returned
by subsequent calls to next.
- Specified by:
remove in interface java.util.Iterator
getEdge
public com.phoenixst.plexus.Graph.Edge getEdge()
- Description copied from interface:
com.phoenixst.plexus.Traverser
- Returns the
Edge which was traversed to get to
the last node returned by Iterator.next()>Iterator.next() 55 . If no edge was
traversed (as in the root of a breadth first search), this
method throws a NoSuchElementException. This
call can be made only if Iterator.remove()>Iterator.remove() 55 or Traverser.removeEdge()>Traverser.removeEdge() 55 has not been called after the last call to Iterator.next()>Iterator.next() 55 .
- Specified by:
getEdge in interface com.phoenixst.plexus.Traverser
removeEdge
public void removeEdge()
- Description copied from interface:
com.phoenixst.plexus.Traverser
- Removes from the underlying com.phoenixst.plexus.Graph the
Edge that would be returned by Traverser.getEdge()>Traverser.getEdge() 55
(optional operation). If no edge was traversed (as in the
root of a breadth first search), this method throws a
NoSuchElementException. This method can be
called only once per call to Iterator.next()>Iterator.next() 55 . The behavior of a
traverser is unspecified if the underlying graph structure is
modified while the traversal is in progress in any way other
than by calling this method or Iterator.remove()>Iterator.remove() 55 .
- Specified by:
removeEdge in interface com.phoenixst.plexus.Traverser
getOtherEndpoint
public java.lang.Object getOtherEndpoint()
- Description copied from interface:
com.phoenixst.plexus.Traverser
- Returns the node at the other end of the edge which was
traversed to get to the last node returned by Iterator.next()>
Iterator.next() 55 .
If no edge was traversed (as in the root of a breadth first
search), this method throws a
NoSuchElementException. This call can be made
only if Iterator.remove()>Iterator.remove() 55 or Traverser.removeEdge()>Traverser.removeEdge() 55 has not been
called after the last call to Iterator.next()>Iterator.next() 55 .
- Specified by:
getOtherEndpoint in interface com.phoenixst.plexus.Traverser