@ Pure public double distanceToBusStop ( ) { final Point2d p1 = getPosition2D ( ) ; if ( p1 != null ) { final BusStop stop = getBusStop ( ) ; if ( stop != null ) { final Point2d p2 = stop . getPosition2D ( ) ; if ( p2 != null ) { return p1 . getDistance ( p2 ) ; } } } return Double . NaN ; }
Replies the distance between the position of this bus itinerary halt and the position of the bus stop associated to this bus itinerary halt .