code: public void addComparator(Comparator<T> comparator, boolean reverse) {
          checkLocked();
  
          comparatorChain.add(comparator);
          if (reverse == true) {
              orderingBits.set(comparatorChain.size() - 1);
          }
      }
docs: Add a Comparator to the end of the chain using the given sortFields order
  
  @param comparator Comparator to add to the end of the chain
  @param reverse    false = forward sortFields order; true = reverse sortFields order