code: private static FactorComparator<Executor> getNumberOfAssignedFlowComparator(final int weight) {
      return FactorComparator
          .create(NUMOFASSIGNEDFLOW_COMPARATOR_NAME, weight, new Comparator<Executor>() {
  
            @Override
            public int compare(final Executor o1, final Executor o2) {
              final ExecutorInfo stat1 = o1.getExecutorInfo();
              final ExecutorInfo stat2 = o2.getExecutorInfo();
  
              final Integer result = 0;
              if (statisticsObjectCheck(stat1, stat2, NUMOFASSIGNEDFLOW_COMPARATOR_NAME)) {
                return result;
              }
              return ((Integer) stat1.getRemainingFlowCapacity())
                  .compareTo(stat2.getRemainingFlowCapacity());
            }
          });
    }
docs: function defines the number of assigned flow comparator.
  
  @param weight weight of the comparator.