MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / medChar

Method medChar

Ports/CLDC11/src/java/util/Arrays.java:3054–3061  ·  view source on GitHub ↗
(int a, int b, int c, String[] arr, int id)

Source from the content-addressed store, hash-verified

3052 * returns the median index.
3053 */
3054 private static int medChar(int a, int b, int c, String[] arr, int id) {
3055 int ac = charAt(arr[a], id);
3056 int bc = charAt(arr[b], id);
3057 int cc = charAt(arr[c], id);
3058 return ac < bc ? (bc < cc ? b : (ac < cc ? c : a))
3059 : (bc < cc ? (ac < cc ? a : c) : b);
3060
3061 }
3062
3063 /*
3064 * Returns the char value at the specified index of string or -1 if the

Callers 1

stableStringSortMethod · 0.95

Calls 1

charAtMethod · 0.95

Tested by

no test coverage detected