public static String formatBearing ( List < Double [ ] > bearings ) { if ( bearings . isEmpty ( ) ) { return null ; } String [ ] bearingFormatted = new String [ bearings . size ( ) ] ; for ( int i = 0 ; i < bearings . size ( ) ; i ++ ) { if ( bearings . get ( i ) . length == 0 ) { bearingFormatted [ i ] = "" ; } else { bearingFormatted [ i ] = String . format ( Locale . US , "%s,%s" , TextUtils . formatCoordinate ( bearings . get ( i ) [ 0 ] ) , TextUtils . formatCoordinate ( bearings . get ( i ) [ 1 ] ) ) ; } } return TextUtils . join ( ";" , bearingFormatted ) ; }
Formats the bearing variables from the raw values to a string which can than be used for the request URL .