Package casa.lepton.walk
Class BusJourney.BusNode
java.lang.Object
casa.lepton.walk.BusJourney.BusNode
- Enclosing class:
- BusJourney
A node in a bus journey. A node can be an ordinary node or a bus stop.
Each node is characterized by the distance to the next node and to the
next bus stop and the arrival time at the next bus stop
-
Method Summary
Modifier and TypeMethodDescriptionlong
getNextNodeArrivalTime
(long departureTime) Give the arrival time at the next node in the bus journey.long
Give the pause duration at this node ie the duration between the arrival time at this node and the departure time from this node.double
getX()
Give the x location of the node.double
getY()
Give the y location of the node.
-
Method Details
-
getX
public double getX()Give the x location of the node.- Returns:
- the x location of the node
-
getY
public double getY()Give the y location of the node.- Returns:
- the y location of the node
-
getPauseDuration
public long getPauseDuration()Give the pause duration at this node ie the duration between the arrival time at this node and the departure time from this node.- Returns:
- the pause duration at this node
-
getNextNodeArrivalTime
public long getNextNodeArrivalTime(long departureTime) Give the arrival time at the next node in the bus journey.- Parameters:
departureTime
- the departure time from this node- Returns:
- the arrival time at the next node
-