Graph
Class Path

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
                    |
                    +--java.util.LinkedList
                          |
                          +--Graph.Path

public class Path
extends LinkedList

Represents a path...in this case, the connections between cities. Could be generalized.

See Also:
Serialized Form

Field Summary
(package private)  Vertex start
           
 
Fields inherited from class java.util.LinkedList
header, size
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Path(Vertex start)
          The only constructor.
 
Method Summary
 void addEdge(Vertex start, Edge e)
          Add an edge to the start of the path.
 String toString()
           
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addBefore, addFirst, addLast, clear, clone, contains, entry, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, readObject, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray, writeObject
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

start

Vertex start
Constructor Detail

Path

public Path(Vertex start)
The only constructor. The smallest path is a single vertex.
Method Detail

addEdge

public void addEdge(Vertex start,
                    Edge e)
Add an edge to the start of the path.

toString

public String toString()
Overrides:
toString in class AbstractCollection