@Test void convert_to_map_of_primitive_to_map_of_primitive_to_object() { DataTable table = parse("", " | | 1 | 2 | 3 |", " | A | ♘ | | ♝ |", " | B | | | |", " | C | | ♝ | |" ); registry.defineDataTableType(new DataTableType(Piece.class, PIECE_TABLE_CELL_TRANSFORMER)); Map<String, Map<Integer, Piece>> expected = new HashMap<String, Map<Integer, Piece>>() {{ put("A", new HashMap<Integer, Piece>() {{ put(1, Piece.WHITE_KNIGHT); put(2, null); put(3, Piece.BLACK_BISHOP); }}); put("B", new HashMap<Integer, Piece>() {{ put(1, null); put(2, null); put(3, null); }}); put("C", new HashMap<Integer, Piece>() {{ put(1, null); put(2, Piece.BLACK_BISHOP); put(3, null); }}); }}; assertEquals(expected, converter.convert(table, MAP_OF_STRING_TO_MAP_OF_INTEGER_TO_PIECE)); }
@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);  }