harpoon.Util.Collections
Class AbstractGraph.Edge<N extends AbstractGraph.Node<N,E>,E extends AbstractGraph.Edge<N,E>>
java.lang.Object
harpoon.Util.Collections.AbstractGraph.Edge<N,E>
- All Implemented Interfaces:
- Graph.Edge<N,E>
- Enclosing class:
- AbstractGraph<N extends AbstractGraph.Node<N,E>,E extends Graph.Edge<N,E>>
public static class AbstractGraph.Edge<N extends AbstractGraph.Node<N,E>,E extends AbstractGraph.Edge<N,E>>
- extends Object
- implements Graph.Edge<N,E>
AbstractGraph.Edge
provides a basic implementation of
the Graph.Edge
interface. This is a simple pair
of "from" and "to" nodes; you don't have to extend this
class when implementing AbstractGraph
if you
prefer to use your own Graph.Edge
implementation.
- Version:
- $Id: AbstractGraph.java,v 1.3 2004/02/08 03:21:44 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
Method Summary |
N |
from()
Returns the node this edge comes from. |
N |
to()
Returns the node this edges goes to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractGraph.Edge
public AbstractGraph.Edge(N from,
N to)
from
public N from()
- Description copied from interface:
Graph.Edge
- Returns the node this edge comes from.
- Specified by:
from
in interface Graph.Edge<N extends AbstractGraph.Node<N,E>,E extends AbstractGraph.Edge<N,E>>
to
public N to()
- Description copied from interface:
Graph.Edge
- Returns the node this edges goes to.
- Specified by:
to
in interface Graph.Edge<N extends AbstractGraph.Node<N,E>,E extends AbstractGraph.Edge<N,E>>