StatisticsCalculatorFactory { public static String getCalculatorName(final Function<double[], Double> calculator) { if (calculator == null) { return null; } return s_instanceNames.get(calculator.getClass()); } private  StatisticsCalculatorFactory(); static Function<double[], Double> getCalculator(final String name); static String getCalculatorName(final Function<double[], Double> calculator); static final String MEAN; static final String MEDIAN; static final String MODE; static final String PEARSON_FIRST_SKEWNESS; static final String PEARSON_SECOND_SKEWNESS; static final String POPULATION_STANDARD_DEVIATION; static final String POPULATION_VARIANCE; static final String QUARTILE_SKEWNESS; static final String SAMPLE_FISHER_KURTOSIS; static final String SAMPLE_PEARSON_KURTOSIS; static final String SAMPLE_SKEWNESS; static final String SAMPLE_STANDARD_DEVIATION; static final String SAMPLE_VARIANCE; static final String GEOMETRIC_MEAN; static final String SAMPLE_COVARIANCE; static final MeanCalculator MEAN_CALCULATOR; static final MedianCalculator MEDIAN_CALCULATOR; static final ModeCalculator MODE_CALCULATOR; static final PearsonFirstSkewnessCoefficientCalculator PEARSON_FIRST_SKEWNESS_CALCULATOR; static final PearsonSecondSkewnessCoefficientCalculator PEARSON_SECOND_SKEWNESS_CALCULATOR; static final PopulationStandardDeviationCalculator POPULATION_STANDARD_DEVIATION_CALCULATOR; static final PopulationVarianceCalculator POPULATION_VARIANCE_CALCULATOR; static final QuartileSkewnessCalculator QUARTILE_SKEWNESSS_CALCULATOR; static final SampleFisherKurtosisCalculator SAMPLE_FISHER_KURTOSIS_CALCULATOR; static final SamplePearsonKurtosisCalculator SAMPLE_PEARSON_KURTOSIS_CALCULATOR; static final SampleSkewnessCalculator SAMPLE_SKEWNESS_CALCULATOR; static final SampleStandardDeviationCalculator SAMPLE_STANDARD_DEVIATION_CALCULATOR; static final SampleVarianceCalculator SAMPLE_VARIANCE_CALCULATOR; static final GeometricMeanCalculator GEOMETRIC_MEAN_CALCULATOR; static final SampleCovarianceCalculator SAMPLE_COVARIANCE_CALCULATOR; }
@Test public void testNullCalculator() { assertNull(StatisticsCalculatorFactory.getCalculatorName(null)); }