List of utility methods to do ArrayList Swap
void | swap(ArrayList swap int temp = numbers.get(i);
numbers.set(i, numbers.get(j));
numbers.set(j, temp);
|
void | swap(ArrayList swap String temp = dataStrs.get(i); dataStrs.set(i, dataStrs.get(j)); dataStrs.set(j, temp); |
void | swap(ArrayList Swap two values in an object array. T tmp = data.get(i); data.set(i, data.get(j)); data.set(j, tmp); |
E | swapRemove(ArrayList swap Remove if (list.size() > 1) { list.set(index, list.get(list.size() - 1)); return list.remove(list.size() - 1); |