@Test void convert_to_map_of_primitive_to_list_of_object__with_default_converter() throws ParseException { DataTable table = parse("", " | Annie M. G. | 1995-03-21 | 1911-03-20 |", " | Roald | 1990-09-13 | 1916-09-13 |", " | Astrid | 1907-10-14 | 1907-11-14 |" ); Map<String, List<Date>> expected = new HashMap<String, List<Date>>() {{ put("Annie M. G.", asList(SIMPLE_DATE_FORMAT.parse("1995-03-21"), SIMPLE_DATE_FORMAT.parse("1911-03-20"))); put("Roald", asList(SIMPLE_DATE_FORMAT.parse("1990-09-13"), SIMPLE_DATE_FORMAT.parse("1916-09-13"))); put("Astrid", asList(SIMPLE_DATE_FORMAT.parse("1907-10-14"), SIMPLE_DATE_FORMAT.parse("1907-11-14"))); }}; registry.setDefaultDataTableCellTransformer(JACKSON_TABLE_CELL_BY_TYPE_CONVERTER); assertEquals(expected, converter.convert(table, MAP_OF_STRING_TO_LIST_OF_DATE)); }
@Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } DataTableTypeRegistryTableConverter(DataTableTypeRegistry registry); }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } DataTableTypeRegistryTableConverter(DataTableTypeRegistry registry); @Override T convert(DataTable dataTable, Type type); @Override @SuppressWarnings("unchecked") T convert(DataTable dataTable, Type type, boolean transposed); @Override List<T> toList(DataTable dataTable, Type itemType); @Override @SuppressWarnings("unchecked") List<List<T>> toLists(DataTable dataTable, Type itemType); @Override Map<K, V> toMap(DataTable dataTable, Type keyType, Type valueType); @Override @SuppressWarnings("unchecked") List<Map<K, V>> toMaps(DataTable dataTable, Type keyType, Type valueType); }
DataTableTypeRegistryTableConverter implements TableConverter { @Override public <T> T convert(DataTable dataTable, Type type) { return convert(dataTable, type, false); } DataTableTypeRegistryTableConverter(DataTableTypeRegistry registry); @Override T convert(DataTable dataTable, Type type); @Override @SuppressWarnings("unchecked") T convert(DataTable dataTable, Type type, boolean transposed); @Override List<T> toList(DataTable dataTable, Type itemType); @Override @SuppressWarnings("unchecked") List<List<T>> toLists(DataTable dataTable, Type itemType); @Override Map<K, V> toMap(DataTable dataTable, Type keyType, Type valueType); @Override @SuppressWarnings("unchecked") List<Map<K, V>> toMaps(DataTable dataTable, Type keyType, Type valueType);  }