harpoon.Util.Collections
Class AbstractGraph.Node<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>

java.lang.Object
  extended by harpoon.Util.Collections.AbstractGraph.Node<N,E>
All Implemented Interfaces:
Graph.Node<N,E>
Enclosing class:
AbstractGraph<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>

public static class AbstractGraph.Node<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>
extends Object
implements Graph.Node<N,E>

AbstractGraph.Node provides a basic implementation of the Graph.Node interface.

Version:
$Id: AbstractGraph.java,v 1.3 2004/02/08 03:21:44 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
AbstractGraph.Node(AbstractGraph<N,E> parent)
           
 
Method Summary
 boolean isPred(N n)
          Return true iff the given node is a predecessor of this node.
 boolean isSucc(N n)
          Return true iff the given node is a successor of this node.
 Set<E> predC()
          Return a collection of edges leading to this node.
 Set<E> succC()
          Return a collection of edges leaving this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGraph.Node

public AbstractGraph.Node(AbstractGraph<N,E> parent)
Method Detail

predC

public Set<E> predC()
Description copied from interface: Graph.Node
Return a collection of edges leading to this node.

Specified by:
predC in interface Graph.Node<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>

succC

public Set<E> succC()
Description copied from interface: Graph.Node
Return a collection of edges leaving this node.

Specified by:
succC in interface Graph.Node<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>

isSucc

public boolean isSucc(N n)
Description copied from interface: Graph.Node
Return true iff the given node is a successor of this node.

Specified by:
isSucc in interface Graph.Node<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>

isPred

public boolean isPred(N n)
Description copied from interface: Graph.Node
Return true iff the given node is a predecessor of this node.

Specified by:
isPred in interface Graph.Node<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>