@ Pure public double distance ( double x , double y ) { double dist = Double . POSITIVE_INFINITY ; if ( isValidPrimitive ( ) ) { for ( final BusStop stop : this . busStops ) { final double d = stop . distance ( x , y ) ; if ( ! Double . isNaN ( d ) && d < dist ) { dist = d ; } } } return Double . isInfinite ( dist ) ? Double . NaN : dist ; }
Replies the distance between the given point and this bus hub .