@Test void testSetCellValueString() { Cell cell = mock(Cell.class); xlsxWriter.setCellValue(cell, "1"); verify(cell).setCellValue("1"); }
@SuppressWarnings("java:S2259") void setCellValue(Cell cell, Object value) { if (value instanceof Boolean) { cell.setCellValue(toBoolean(value)); } else if (value instanceof LocalDate) { cell.setCellValue(ISO_LOCAL_DATE.format((LocalDate) value)); } else if (value instanceof Instant) { cell.setCellValue(ISO_INSTANT.format((Instant) value)); } else if (value instanceof Double) { cell.setCellValue(toDouble(value)); } else if (value instanceof Integer) { cell.setCellValue(toInt(value)); } else if (value instanceof Long) { cell.setCellValue(toLong(value)); } else if (value instanceof String) { cell.setCellValue(value.toString()); } else { throw new UnsupportedValueException(value); } }
XlsxWriter implements AutoCloseable { @SuppressWarnings("java:S2259") void setCellValue(Cell cell, Object value) { if (value instanceof Boolean) { cell.setCellValue(toBoolean(value)); } else if (value instanceof LocalDate) { cell.setCellValue(ISO_LOCAL_DATE.format((LocalDate) value)); } else if (value instanceof Instant) { cell.setCellValue(ISO_INSTANT.format((Instant) value)); } else if (value instanceof Double) { cell.setCellValue(toDouble(value)); } else if (value instanceof Integer) { cell.setCellValue(toInt(value)); } else if (value instanceof Long) { cell.setCellValue(toLong(value)); } else if (value instanceof String) { cell.setCellValue(value.toString()); } else { throw new UnsupportedValueException(value); } } }
XlsxWriter implements AutoCloseable { @SuppressWarnings("java:S2259") void setCellValue(Cell cell, Object value) { if (value instanceof Boolean) { cell.setCellValue(toBoolean(value)); } else if (value instanceof LocalDate) { cell.setCellValue(ISO_LOCAL_DATE.format((LocalDate) value)); } else if (value instanceof Instant) { cell.setCellValue(ISO_INSTANT.format((Instant) value)); } else if (value instanceof Double) { cell.setCellValue(toDouble(value)); } else if (value instanceof Integer) { cell.setCellValue(toInt(value)); } else if (value instanceof Long) { cell.setCellValue(toLong(value)); } else if (value instanceof String) { cell.setCellValue(value.toString()); } else { throw new UnsupportedValueException(value); } } XlsxWriter(Path target, Workbook workbook); }
XlsxWriter implements AutoCloseable { @SuppressWarnings("java:S2259") void setCellValue(Cell cell, Object value) { if (value instanceof Boolean) { cell.setCellValue(toBoolean(value)); } else if (value instanceof LocalDate) { cell.setCellValue(ISO_LOCAL_DATE.format((LocalDate) value)); } else if (value instanceof Instant) { cell.setCellValue(ISO_INSTANT.format((Instant) value)); } else if (value instanceof Double) { cell.setCellValue(toDouble(value)); } else if (value instanceof Integer) { cell.setCellValue(toInt(value)); } else if (value instanceof Long) { cell.setCellValue(toLong(value)); } else if (value instanceof String) { cell.setCellValue(value.toString()); } else { throw new UnsupportedValueException(value); } } XlsxWriter(Path target, Workbook workbook); boolean hasSheet(String name); void createSheet(String name, List<Object> headers); void writeRows(Stream<List<Object>> rows, String sheetName); @Override void close(); }
XlsxWriter implements AutoCloseable { @SuppressWarnings("java:S2259") void setCellValue(Cell cell, Object value) { if (value instanceof Boolean) { cell.setCellValue(toBoolean(value)); } else if (value instanceof LocalDate) { cell.setCellValue(ISO_LOCAL_DATE.format((LocalDate) value)); } else if (value instanceof Instant) { cell.setCellValue(ISO_INSTANT.format((Instant) value)); } else if (value instanceof Double) { cell.setCellValue(toDouble(value)); } else if (value instanceof Integer) { cell.setCellValue(toInt(value)); } else if (value instanceof Long) { cell.setCellValue(toLong(value)); } else if (value instanceof String) { cell.setCellValue(value.toString()); } else { throw new UnsupportedValueException(value); } } XlsxWriter(Path target, Workbook workbook); boolean hasSheet(String name); void createSheet(String name, List<Object> headers); void writeRows(Stream<List<Object>> rows, String sheetName); @Override void close();  }