DataStructures
Class WeightedGraph.Arc

java.lang.Object
  extended by DataStructures.WeightedGraph.Arc
Enclosing class:
WeightedGraph

public static class WeightedGraph.Arc
extends java.lang.Object

A public class returned by WeightedGraph.arcs() and WeightedGraph.iterator().

An arc is represented as a tail head weight triple, where tail and head are string node labels and weight is an integer.

See Also:
WeightedGraph.arcs()

Method Summary
 java.lang.String head()
          Returns the head or destination of this arc.
 java.lang.String tail()
          Returns the tail or source of this arc.
 java.lang.String toString()
          Represents the arc as a string.
 int weight()
          Returns the weight attached to this arc.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

tail

public java.lang.String tail()
Returns the tail or source of this arc.

Returns:
the tail of the arc.

head

public java.lang.String head()
Returns the head or destination of this arc.

Returns:
the head of the arc.

weight

public int weight()
Returns the weight attached to this arc.

Returns:
the weight of the arc.

toString

public java.lang.String toString()
Represents the arc as a string.

Overrides:
toString in class java.lang.Object
Returns:
the string representation.