prefuse.data.util
Class NeighborList<N extends Node<N,E>,E extends Edge<N,E>>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<N>
          extended by prefuse.data.util.NeighborList<N,E>
All Implemented Interfaces:
java.lang.Iterable<N>, java.util.Collection<N>, java.util.List<N>

public class NeighborList<N extends Node<N,E>,E extends Edge<N,E>>
extends java.util.AbstractList<N>

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

Author:
jeffrey heer

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
NeighborList(N n, java.util.List<E> edges)
          Create a new NeighborIterator.
 
Method Summary
 N get(int index)
           
 int size()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

NeighborList

public NeighborList(N n,
                    java.util.List<E> edges)
Create a new NeighborIterator.

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

get

public N get(int index)
Specified by:
get in interface java.util.List<N extends Node<N,E>>
Specified by:
get in class java.util.AbstractList<N extends Node<N,E>>

size

public int size()
Specified by:
size in interface java.util.Collection<N extends Node<N,E>>
Specified by:
size in interface java.util.List<N extends Node<N,E>>
Specified by:
size in class java.util.AbstractCollection<N extends Node<N,E>>


Copyright © 2008 Regents of the University of California