public double fullPathDistance(final DistanceStyle distanceStyle){
synchronized (fullDistanceCache) {
    Double dist=fullDistanceCache.get(distanceStyle);
    if (dist == null) {
      dist=new Double(distanceStyle.computeDistance(start,end.x,end.y,end.z));
      fullDistanceCache.put(distanceStyle,dist);
    }
    return dist.doubleValue();
  }
}

public double fullPathDistance ( final DistanceStyle distanceStyle ) { synchronized ( fullDistanceCache ) { Double dist = fullDistanceCache . get ( distanceStyle ) ; if ( dist == null ) { dist = new Double ( distanceStyle . computeDistance ( start , end . x , end . y , end . z ) ) ; fullDistanceCache . put ( distanceStyle , dist ) ; } return dist . doubleValue ( ) ; } }
compute the full distance along this path segment .
