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

Method medChar

vm/JavaAPI/src/java/util/Arrays.java:2885–2892  ·  view source on GitHub ↗
(int a, int b, int c, String[] arr, int id)

Source from the content-addressed store, hash-verified

2883 * returns the median index.
2884 */
2885 private static int medChar(int a, int b, int c, String[] arr, int id) {
2886 int ac = charAt(arr[a], id);
2887 int bc = charAt(arr[b], id);
2888 int cc = charAt(arr[c], id);
2889 return ac < bc ? (bc < cc ? b : (ac < cc ? c : a))
2890 : (bc < cc ? (ac < cc ? a : c) : b);
2891
2892 }
2893
2894 /*
2895 * 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