code: public int compare(T o1, T o2) throws UnsupportedOperationException {
          if (isLocked == false) {
              checkChainIntegrity();
              isLocked = true;
          }
  
          // iterate over all comparators in the chain
          Iterator<Comparator<T>> comparators = comparatorChain.iterator();
          for (int comparatorIndex = 0; comparators.hasNext(); ++comparatorIndex) {
  
              Comparator<T> comparator = comparators.next();
              int retval = comparator.compare(o1, o2);
              if (retval != 0) {
                  // invert the order if it is a reverse sortFields
                  if (orderingBits.get(comparatorIndex) == true) {
                      if (Integer.MIN_VALUE == retval) {
                          retval = Integer.MAX_VALUE;
                      } else {
                          retval *= -1;
                      }
                  }
  
                  return retval;
              }
  
          }
  
          // if comparators are exhausted, return 0
          return 0;
      }
docs: Perform comparisons on the Objects as per Comparator.compare(o1,o2).
  
  @param o1 the first object to compare
  @param o2 the second object to compare
  @return -1, 0, or 1
  @throws UnsupportedOperationException if the ComparatorChain does not contain at least one Comparator