Swaps two elements in the given boolean array. There is no special handling for multi-dimensional arrays. This method does nothing for a null or empty input array or for overflow indices. Negative indices are promoted to 0(zero). Examples: ArrayUtils.swap([1, 2, 3], 0,
(final boolean[] array, final int offset1, final int offset2)
| 8394 | * @since 3.5 |
| 8395 | */ |
| 8396 | public static void swap(final boolean[] array, final int offset1, final int offset2) { |
| 8397 | swap(array, offset1, offset2, 1); |
| 8398 | } |
| 8399 | |
| 8400 | /** |
| 8401 | * Swaps a series of elements in the given boolean array. |