@Test(expected = NullPointerException.class) public void recalculateSeries_NullRateYValue() { Series<Object, Integer> series = new Series<>(); recalculator.recalculateSeries(series, new JudgmentSeriesCriteria(), new XSettings(), new YSettings()); }
@Override public Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings) { RateYValue rateYValue = (RateYValue)ysettings.getValueType(); Preconditions.checkNotNull(rateYValue); Series<Object, Integer> baseSeries = rateBaseSeriesGenerator.generateRateBaseSeries(criteria, xsettings); return recalculateSeries(series, baseSeries, rateYValue.getRateRatio()); }
SeriesYRateRecalculator implements SeriesYRecalculator { @Override public Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings) { RateYValue rateYValue = (RateYValue)ysettings.getValueType(); Preconditions.checkNotNull(rateYValue); Series<Object, Integer> baseSeries = rateBaseSeriesGenerator.generateRateBaseSeries(criteria, xsettings); return recalculateSeries(series, baseSeries, rateYValue.getRateRatio()); } }
SeriesYRateRecalculator implements SeriesYRecalculator { @Override public Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings) { RateYValue rateYValue = (RateYValue)ysettings.getValueType(); Preconditions.checkNotNull(rateYValue); Series<Object, Integer> baseSeries = rateBaseSeriesGenerator.generateRateBaseSeries(criteria, xsettings); return recalculateSeries(series, baseSeries, rateYValue.getRateRatio()); }  }
SeriesYRateRecalculator implements SeriesYRecalculator { @Override public Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings) { RateYValue rateYValue = (RateYValue)ysettings.getValueType(); Preconditions.checkNotNull(rateYValue); Series<Object, Integer> baseSeries = rateBaseSeriesGenerator.generateRateBaseSeries(criteria, xsettings); return recalculateSeries(series, baseSeries, rateYValue.getRateRatio()); }  @Override Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings); @Override boolean handles(YValueType yValueType); @Autowired void setRateBaseSeriesGenerator(RateBaseSeriesGenerator rateBaseSeriesGenerator); }
SeriesYRateRecalculator implements SeriesYRecalculator { @Override public Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings) { RateYValue rateYValue = (RateYValue)ysettings.getValueType(); Preconditions.checkNotNull(rateYValue); Series<Object, Integer> baseSeries = rateBaseSeriesGenerator.generateRateBaseSeries(criteria, xsettings); return recalculateSeries(series, baseSeries, rateYValue.getRateRatio()); }  @Override Series<Object, ? extends Number> recalculateSeries(Series<Object, Integer> series, JudgmentSeriesCriteria criteria, XSettings xsettings, YSettings ysettings); @Override boolean handles(YValueType yValueType); @Autowired void setRateBaseSeriesGenerator(RateBaseSeriesGenerator rateBaseSeriesGenerator);  }