MCPcopy Create free account
hub / github.com/davidgiven/luje / swap

Method swap

lib/java/util/Arrays.java:2383–2387  ·  view source on GitHub ↗

Swaps the elements at the given indices in the array. @param a - the index of one element to be swapped. @param b - the index of the other element to be swapped. @param arr - the array in which to swap elements.

(int a, int b, Object[] arr)

Source from the content-addressed store, hash-verified

2381 * the array in which to swap elements.
2382 */
2383 private static void swap(int a, int b, Object[] arr) {
2384 Object tmp = arr[a];
2385 arr[a] = arr[b];
2386 arr[b] = tmp;
2387 }
2388
2389 /**
2390 * Performs a sort on the section of the array between the given indices

Callers 1

copySwapMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected