@Test void convert_to_list_of_map() { DataTable table = parse("", "| firstName | lastName | birthDate |", "| Annie M. G. | Schmidt | 1911-03-20 |", "| Roald | Dahl | 1916-09-13 |", "| Astrid | Lindgren | 1907-11-14 |" ); List<HashMap<String, String>> expected = asList( new HashMap<String, String>() {{ put("firstName", "Annie M. G."); put("lastName", "Schmidt"); put("birthDate", "1911-03-20"); }}, new HashMap<String, String>() {{ put("firstName", "Roald"); put("lastName", "Dahl"); put("birthDate", "1916-09-13"); }}, new HashMap<String, String>() {{ put("firstName", "Astrid"); put("lastName", "Lindgren"); put("birthDate", "1907-11-14"); }} ); assertEquals(expected, converter.convert(table, LIST_OF_MAP)); }
@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);  }