code: public static <T> FactorComparator<T> create(final String factorName, final int weight,
        final Comparator<T> comparator) {
  
      if (null == factorName || factorName.length() == 0 || weight < 0 || null == comparator) {
        logger.error(
            "failed to create instance of FactorComparator, at least one of the input paramters are invalid");
        return null;
      }
  
      return new FactorComparator<>(factorName, weight, comparator);
    }
docs: static function to generate an instance of the class. refer to the constructor for the param
  definitions.