code: public void setComparator(int index, Comparator<T> comparator, boolean ascending) {
          this.comparators.set(index, new InvertibleComparator<>(comparator, ascending));
      }
docs: Replace the Comparator at the given index using the given sort order.
  
  @param index the index of the Comparator to replace
  @param comparator the Comparator to place at the given index
  @param ascending the sort order: ascending (true) or descending (false)