prefuse.data.util
Class NeighborIterator

java.lang.Object
  extended by prefuse.data.util.NeighborIterator
All Implemented Interfaces:
java.util.Iterator

public class NeighborIterator
extends java.lang.Object
implements java.util.Iterator

Iterator over neighbors of a given Node. Resolves Edge instances to provide direct iteration over the Node instances.

Author:
jeffrey heer

Constructor Summary
NeighborIterator(Node n, java.util.Iterator edges)
          Create a new NeighborIterator.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeighborIterator

public NeighborIterator(Node n,
                        java.util.Iterator edges)
Create a new NeighborIterator.

Parameters:
n - the source node
edges - the node edges to iterate over
Method Detail

remove

public void remove()
Specified by:
remove in interface java.util.Iterator
See Also:
Iterator.remove()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator
See Also:
Iterator.hasNext()

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator
See Also:
Iterator.next()


Copyright © 2007 Regents of the University of California