Class ConnectionPath

java.lang.Object
  extended by ConnectionPath

 class ConnectionPath
extends java.lang.Object

ConnectionPath objects are used in the implementation of Intersection class. Each intersection objects has an array of ConnectionPath. ConnectionPath stores a path from an intersection to another intersection along with according spokes


Field Summary
(package private)  Intersection a
          variable Intersection - destination intersection
(package private)  int spoke1
          variable spoke1 - the spoke of origin intersection in this path
(package private)  int spoke2
          variable spoke2 - the spoke of origin intersection in this path
 
Constructor Summary
ConnectionPath(Intersection a, int spoke1, int spoke2)
          Constructor
 
Method Summary
 Intersection getIntersection()
          Return the destination intersection
 int getSpoke1()
          Return spoke of origin intersection
 int getSpoke2()
          Return spoke of destination intersection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

Intersection a
variable Intersection - destination intersection


spoke1

int spoke1
variable spoke1 - the spoke of origin intersection in this path


spoke2

int spoke2
variable spoke2 - the spoke of origin intersection in this path

Constructor Detail

ConnectionPath

public ConnectionPath(Intersection a,
                      int spoke1,
                      int spoke2)
Constructor

Parameters:
a - destination intersection
spoke1 - the spoke of origin intersection in this path
spoke2 - the spoke of destination intersection in this path
Method Detail

getIntersection

public Intersection getIntersection()
Return the destination intersection

Returns:
an Intersection variable

getSpoke1

public int getSpoke1()
Return spoke of origin intersection

Returns:
an int variable

getSpoke2

public int getSpoke2()
Return spoke of destination intersection

Returns:
an int variable