org.eigenbase.util
Class Graph.Arc<T>

java.lang.Object
  extended by org.eigenbase.util.Graph.Arc<T>
Enclosing class:
Graph<T>

public static class Graph.Arc<T>
extends Object

An Arc is a directed link between two nodes.

The nodes are compared according to Object.equals(java.lang.Object) and Object.hashCode(). We assume that their Object.toString() works, too.


Field Summary
 T from
           
private  String string
           
 T to
           
 
Constructor Summary
Graph.Arc(T from, T to)
          Creates an arc.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
private static
<T> String
toString(Graph.Arc<T>[] arcs)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

from

public final T from

to

public final T to

string

private final String string
Constructor Detail

Graph.Arc

public Graph.Arc(T from,
                 T to)
Creates an arc.

"Precondition:"
from != null, to != null
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

toString

private static <T> String toString(Graph.Arc<T>[] arcs)