@Test(expected = NullPointerException.class) public void generateRow_NULL_CHART() { chartCsvGenerator.generateRow(null, 1); }
public String[] generateRow(Chart<Object, Number> chart, int rowNumber) { Preconditions.checkNotNull(chart); Preconditions.checkArgument(rowNumber >= 0); Preconditions.checkArgument(rowNumber < chart.getSeriesList().get(0).getPoints().size()); List<String> row = Lists.newArrayList(); List<Series<Object, Number>> seriesList = chart.getSeriesList(); row.add(pointValueFormatterManager.format(seriesList.get(0).getPoints().get(rowNumber).getX())); for (Series<Object, Number> series : seriesList) { row.add(pointValueFormatterManager.format(series.getPoints().get(rowNumber).getY())); } return row.toArray(new String[row.size()]); }
ChartCsvGenerator { public String[] generateRow(Chart<Object, Number> chart, int rowNumber) { Preconditions.checkNotNull(chart); Preconditions.checkArgument(rowNumber >= 0); Preconditions.checkArgument(rowNumber < chart.getSeriesList().get(0).getPoints().size()); List<String> row = Lists.newArrayList(); List<Series<Object, Number>> seriesList = chart.getSeriesList(); row.add(pointValueFormatterManager.format(seriesList.get(0).getPoints().get(rowNumber).getX())); for (Series<Object, Number> series : seriesList) { row.add(pointValueFormatterManager.format(series.getPoints().get(rowNumber).getY())); } return row.toArray(new String[row.size()]); } }
ChartCsvGenerator { public String[] generateRow(Chart<Object, Number> chart, int rowNumber) { Preconditions.checkNotNull(chart); Preconditions.checkArgument(rowNumber >= 0); Preconditions.checkArgument(rowNumber < chart.getSeriesList().get(0).getPoints().size()); List<String> row = Lists.newArrayList(); List<Series<Object, Number>> seriesList = chart.getSeriesList(); row.add(pointValueFormatterManager.format(seriesList.get(0).getPoints().get(rowNumber).getX())); for (Series<Object, Number> series : seriesList) { row.add(pointValueFormatterManager.format(series.getPoints().get(rowNumber).getY())); } return row.toArray(new String[row.size()]); }  }
ChartCsvGenerator { public String[] generateRow(Chart<Object, Number> chart, int rowNumber) { Preconditions.checkNotNull(chart); Preconditions.checkArgument(rowNumber >= 0); Preconditions.checkArgument(rowNumber < chart.getSeriesList().get(0).getPoints().size()); List<String> row = Lists.newArrayList(); List<Series<Object, Number>> seriesList = chart.getSeriesList(); row.add(pointValueFormatterManager.format(seriesList.get(0).getPoints().get(rowNumber).getX())); for (Series<Object, Number> series : seriesList) { row.add(pointValueFormatterManager.format(series.getPoints().get(rowNumber).getY())); } return row.toArray(new String[row.size()]); }  String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale); String[] generateRow(Chart<Object, Number> chart, int rowNumber); @Autowired @Qualifier("csvPointValueFormatterManager") void setPointValueFormatterManager(PointValueFormatterManager pointValueFormatterManager); @Autowired void setMessageSource(MessageSource messageSource); }
ChartCsvGenerator { public String[] generateRow(Chart<Object, Number> chart, int rowNumber) { Preconditions.checkNotNull(chart); Preconditions.checkArgument(rowNumber >= 0); Preconditions.checkArgument(rowNumber < chart.getSeriesList().get(0).getPoints().size()); List<String> row = Lists.newArrayList(); List<Series<Object, Number>> seriesList = chart.getSeriesList(); row.add(pointValueFormatterManager.format(seriesList.get(0).getPoints().get(rowNumber).getX())); for (Series<Object, Number> series : seriesList) { row.add(pointValueFormatterManager.format(series.getPoints().get(rowNumber).getY())); } return row.toArray(new String[row.size()]); }  String[] generateHeader(ChartCode chartCode, AnalysisForm analysisForm, Locale locale); String[] generateRow(Chart<Object, Number> chart, int rowNumber); @Autowired @Qualifier("csvPointValueFormatterManager") void setPointValueFormatterManager(PointValueFormatterManager pointValueFormatterManager); @Autowired void setMessageSource(MessageSource messageSource);  }