code: protected void registerFactorComparator(final FactorComparator<T> comparator) {
      if (null == comparator ||
          Integer.MAX_VALUE - this.getTotalWeight() < comparator.getWeight()) {
        throw new IllegalArgumentException("unable to register comparator." +
            " The passed comparator is null or has an invalid weight value.");
      }
  
      // add or replace the Comparator.
      this.factorComparatorList.put(comparator.getFactorName(), comparator);
      logger.debug(String.format("Factor comparator added for '%s'. Weight = '%s'",
          comparator.getFactorName(), comparator.getWeight()));
    }
docs: function to register a factorComparator to the internal Map for future reference.
  
  @param factorComparator : the comparator object to be registered.