Replaces an element in the array with the given item and returns the replaced item. @param The type of elements in the array, which must be comparable @param array The array in which the replacement will occur @param pos The position at which the replacement will occur @param item The item
(final T[] array, final int pos, final T item)
| 81 | * @return The replaced item |
| 82 | */ |
| 83 | private <T extends Comparable<T>> T replace(final T[] array, final int pos, final T item) { |
| 84 | final T replacedItem = array[pos]; |
| 85 | array[pos] = item; |
| 86 | return replacedItem; |
| 87 | } |
| 88 | } |
no outgoing calls