public static String formatDistributions ( List < Integer [ ] > distributions ) { if ( distributions . isEmpty ( ) ) { return null ; } String [ ] distributionsFormatted = new String [ distributions . size ( ) ] ; for ( int i = 0 ; i < distributions . size ( ) ; i ++ ) { if ( distributions . get ( i ) . length == 0 ) { distributionsFormatted [ i ] = "" ; } else { distributionsFormatted [ i ] = String . format ( Locale . US , "%s,%s" , TextUtils . formatCoordinate ( distributions . get ( i ) [ 0 ] ) , TextUtils . formatCoordinate ( distributions . get ( i ) [ 1 ] ) ) ; } } return TextUtils . join ( ";" , distributionsFormatted ) ; }
converts the list of integer arrays to a string ready for API consumption .