Returns a string containing the supplied unsigned long values separated by separator. For example, join("-", 1, 2, 3) returns the string "1-2-3". @param separator the text that should appear between consecutive values in the resulting string (but not at the start
(String separator, long... array)
| 135 | |
| 136 | |
| 137 | public static String join(String separator, long... array) { |
| 138 | checkNotNull(separator); |
| 139 | if (array.length == 0) { |
| 140 | return ""; |
| 141 | } |
| 142 | |
| 143 | // For pre-sizing a builder, just get the right order of magnitude |
| 144 | StringBuilder builder = new StringBuilder(array.length * 5); |
| 145 | builder.append(toString(array[0])); |
| 146 | for (int i = 1; i < array.length; i++) { |
| 147 | builder.append(separator).append(toString(array[i])); |
| 148 | } |
| 149 | return builder.toString(); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Returns a comparator that compares two arrays of unsigned {@code long} values <a |
nothing calls this directly
no test coverage detected