TextUtils { public static String join(CharSequence delimiter, Object[] tokens) { if (tokens == null || tokens.length < 1) { return null; } StringBuilder sb = new StringBuilder(); boolean firstTime = true; for (Object token : tokens) { if (firstTime) { firstTime = false; } else { sb.append(delimiter); } sb.append(token); } return sb.toString(); } private  TextUtils(); static boolean isEmpty(CharSequence str); static String join(CharSequence delimiter, Object[] tokens); static String formatCoordinate(double coordinate); static String formatCoordinate(double coordinate, int precision); @Deprecated static String formatRadiuses(double[] radiuses); @Deprecated static String formatBearing(List<Double[]> bearings); @Deprecated static String formatDistributions(List<Integer[]> distributions); @Deprecated static String formatApproaches(String[] approaches); @Deprecated static String formatWaypointNames(String[] waypointNames);  }
@Test public void joinTest() throws Exception { Float[] numbers = new Float[4]; for (int i = 0; i < 4; i++) { numbers[i] = 1.0f * i; } Assert.assertEquals("0.0-1.0-2.0-3.0", TextUtils.join("-", numbers)); }