Lines 260-266
Link Here
|
260 |
* |
260 |
* |
261 |
* @param array the given array |
261 |
* @param array the given array |
262 |
* @param prefix the given prefix |
262 |
* @param prefix the given prefix |
263 |
* @return the result of the comparison |
263 |
* @return the result of the comparison (>=0 if array>prefix) |
264 |
* @exception NullPointerException if either array or prefix is null |
264 |
* @exception NullPointerException if either array or prefix is null |
265 |
*/ |
265 |
*/ |
266 |
public static final int compareWith(char[] array, char[] prefix) { |
266 |
public static final int compareWith(char[] array, char[] prefix) { |
Lines 276-282
Link Here
|
276 |
} |
276 |
} |
277 |
if (prefixLength == i) |
277 |
if (prefixLength == i) |
278 |
return 0; |
278 |
return 0; |
279 |
return 1; |
279 |
return -1; // array is shorter than prefix (e.g. array:'ab' < prefix:'abc'). |
280 |
} |
280 |
} |
281 |
|
281 |
|
282 |
/** |
282 |
/** |