org.eigenbase.util
Class Graph.Arc<T>
java.lang.Object
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.
Constructor Summary |
Graph.Arc(T from,
T to)
Creates an arc. |
from
public final T from
to
public final T to
string
private final String string
Graph.Arc
public Graph.Arc(T from,
T to)
- Creates an arc.
- "Precondition:"
- from != null, to != null
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)