code: private static final <T> void swap(List<T> data, int a, int b) {
      data.set(b, data.set(a, data.get(b)));
    }
docs: The usual swap method.
  
  @param <T> object type
  @param data Array
  @param a First index
  @param b Second index