ptolemy.actor.gt
Class GraphAnalyzer.Path

java.lang.Object
  extended by ptolemy.actor.gt.data.FastLinkedList<GraphAnalyzer.IndexedList>
      extended by ptolemy.actor.gt.GraphAnalyzer.IndexedLists
          extended by ptolemy.actor.gt.GraphAnalyzer.Path
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<GraphAnalyzer.IndexedList>, java.util.Collection<GraphAnalyzer.IndexedList>
Enclosing class:
GraphAnalyzer

public static class GraphAnalyzer.Path
extends GraphAnalyzer.IndexedLists
implements java.lang.Cloneable

A path between two ports.

Since:
Ptolemy II 7.1
Version:
$Id: GraphAnalyzer.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.actor.gt.data.FastLinkedList
FastLinkedList.Entry
 
Field Summary
private  Port _startPort
          The start port.
 
Constructor Summary
GraphAnalyzer.Path(Port startPort)
          Construct a path, which has 0 length, with only a start port.
 
Method Summary
 java.lang.Object clone()
          Clone this path and return a new path containing the same entries between the same pair of ports.
 boolean equals(java.lang.Object object)
          Test the equivalence between two paths.
 Port getEndPort()
          Get the end port of this path.
 Port getStartPort()
          Get the start port of this path.
 int hashCode()
          Return the hash code of this path, which is a combination of the start port's hash code and a hash code computed with all the entries inside.
 java.lang.String toString()
          Return a string that describes this path.
 
Methods inherited from class ptolemy.actor.gt.data.FastLinkedList
add, addAll, addEntryAfter, addEntryBefore, addEntryToHead, addEntryToTail, clear, contains, containsAll, findEntry, getHead, getTail, isEmpty, iterator, remove, removeAll, removeAllAfter, removeAllBefore, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_startPort

private Port _startPort
The start port.

Constructor Detail

GraphAnalyzer.Path

GraphAnalyzer.Path(Port startPort)
Construct a path, which has 0 length, with only a start port.

Parameters:
startPort - The start port.
Method Detail

clone

public java.lang.Object clone()
Clone this path and return a new path containing the same entries between the same pair of ports.

Overrides:
clone in class java.lang.Object
Returns:
A new path.

equals

public boolean equals(java.lang.Object object)
Test the equivalence between two paths. They are equivalent if they have the same ports and entries.

Specified by:
equals in interface java.util.Collection<GraphAnalyzer.IndexedList>
Overrides:
equals in class java.lang.Object
Parameters:
object - The object to be tested.
Returns:
true if the object is a path and it is equivalent to this path; false otherwise.

getEndPort

public Port getEndPort()
Get the end port of this path.

Returns:
The end port.

getStartPort

public Port getStartPort()
Get the start port of this path.

Returns:
The start port.

hashCode

public int hashCode()
Return the hash code of this path, which is a combination of the start port's hash code and a hash code computed with all the entries inside.

Specified by:
hashCode in interface java.util.Collection<GraphAnalyzer.IndexedList>
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.

toString

public java.lang.String toString()
Return a string that describes this path.

Overrides:
toString in class java.lang.Object
Returns:
A string that describes this path.