@Test @SuppressWarnings({"unchecked", "rawtypes"}) public void returnsParameterizedMetricManager_whenParameterizedMetricsSet() { final Map precisionAtFiveConfig = new HashMap(); precisionAtFiveConfig.put("class", "io.sease.rre.core.domain.metrics.impl.PrecisionAtK"); precisionAtFiveConfig.put("v", 5); final Map<String, Map> parameterizedConfig = new HashMap<>(); parameterizedConfig.put("pAt5", precisionAtFiveConfig); MetricClassManager test = factory.buildMetricClassManager(METRICS, parameterizedConfig); assertThat(test).isInstanceOf(ParameterizedMetricClassManager.class); }
@SuppressWarnings("rawtypes") public MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics) { final MetricClassManager metricClassManager; if (parameterizedMetrics == null || parameterizedMetrics.isEmpty()) { metricClassManager = new SimpleMetricClassManager(metrics); } else { metricClassManager = new ParameterizedMetricClassManager(metrics, parameterizedMetrics); } return metricClassManager; }
MetricClassConfigurationManager { @SuppressWarnings("rawtypes") public MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics) { final MetricClassManager metricClassManager; if (parameterizedMetrics == null || parameterizedMetrics.isEmpty()) { metricClassManager = new SimpleMetricClassManager(metrics); } else { metricClassManager = new ParameterizedMetricClassManager(metrics, parameterizedMetrics); } return metricClassManager; } }
MetricClassConfigurationManager { @SuppressWarnings("rawtypes") public MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics) { final MetricClassManager metricClassManager; if (parameterizedMetrics == null || parameterizedMetrics.isEmpty()) { metricClassManager = new SimpleMetricClassManager(metrics); } else { metricClassManager = new ParameterizedMetricClassManager(metrics, parameterizedMetrics); } return metricClassManager; }  }
MetricClassConfigurationManager { @SuppressWarnings("rawtypes") public MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics) { final MetricClassManager metricClassManager; if (parameterizedMetrics == null || parameterizedMetrics.isEmpty()) { metricClassManager = new SimpleMetricClassManager(metrics); } else { metricClassManager = new ParameterizedMetricClassManager(metrics, parameterizedMetrics); } return metricClassManager; }  static MetricClassConfigurationManager getInstance(); @SuppressWarnings("rawtypes") MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics); BigDecimal getDefaultMaximumGrade(); MetricClassConfigurationManager setDefaultMaximumGrade(final float defaultMaximumGrade); BigDecimal getDefaultMissingGrade(); MetricClassConfigurationManager setDefaultMissingGrade(final float defaultMissingGrade); }
MetricClassConfigurationManager { @SuppressWarnings("rawtypes") public MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics) { final MetricClassManager metricClassManager; if (parameterizedMetrics == null || parameterizedMetrics.isEmpty()) { metricClassManager = new SimpleMetricClassManager(metrics); } else { metricClassManager = new ParameterizedMetricClassManager(metrics, parameterizedMetrics); } return metricClassManager; }  static MetricClassConfigurationManager getInstance(); @SuppressWarnings("rawtypes") MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics); BigDecimal getDefaultMaximumGrade(); MetricClassConfigurationManager setDefaultMaximumGrade(final float defaultMaximumGrade); BigDecimal getDefaultMissingGrade(); MetricClassConfigurationManager setDefaultMissingGrade(final float defaultMissingGrade);  }