code: public void setComparator(int index, Comparator<T> comparator, boolean reverse) {
          checkLocked();
  
          comparatorChain.set(index, comparator);
          if (reverse == true) {
              orderingBits.set(index);
          } else {
              orderingBits.clear(index);
          }
      }
docs: Replace the Comparator at the given index in the ComparatorChain, using the given sortFields order
  
  @param index      index of the Comparator to replace
  @param comparator Comparator to set
  @param reverse    false = forward sortFields order; true = reverse sortFields order