@Test public void testSimpleDataset() throws Exception { Map<String, String> data = new HashMap<>(); data.put("column", "value"); Dataset dataset = new SimpleDataset("Test", data); assertEquals("Test", dataset.getKey()); assertEquals("value", dataset.get("column")); assertThrows(ColumnNotFoundException.class, () -> dataset.get("column2")); Dataset dataset2 = new SimpleDataset(List.of("column"), dataset); assertEquals("Test", dataset2.getKey()); assertEquals("value", dataset2.get("column")); }
public SimpleDataset(Collection<String> schema, Dataset ds) throws ColumnNotFoundException { key = ds.getKey(); data = new HashMap<>(); for (String spalte : schema) { data.put(spalte, ds.get(spalte)); } }
SimpleDataset implements Dataset { public SimpleDataset(Collection<String> schema, Dataset ds) throws ColumnNotFoundException { key = ds.getKey(); data = new HashMap<>(); for (String spalte : schema) { data.put(spalte, ds.get(spalte)); } } }
SimpleDataset implements Dataset { public SimpleDataset(Collection<String> schema, Dataset ds) throws ColumnNotFoundException { key = ds.getKey(); data = new HashMap<>(); for (String spalte : schema) { data.put(spalte, ds.get(spalte)); } } SimpleDataset(Collection<String> schema, Dataset ds);  SimpleDataset(String key, Map<String, String> data); }
SimpleDataset implements Dataset { public SimpleDataset(Collection<String> schema, Dataset ds) throws ColumnNotFoundException { key = ds.getKey(); data = new HashMap<>(); for (String spalte : schema) { data.put(spalte, ds.get(spalte)); } } SimpleDataset(Collection<String> schema, Dataset ds);  SimpleDataset(String key, Map<String, String> data); @Override String get(String columnName); @Override String getKey(); }
SimpleDataset implements Dataset { public SimpleDataset(Collection<String> schema, Dataset ds) throws ColumnNotFoundException { key = ds.getKey(); data = new HashMap<>(); for (String spalte : schema) { data.put(spalte, ds.get(spalte)); } } SimpleDataset(Collection<String> schema, Dataset ds);  SimpleDataset(String key, Map<String, String> data); @Override String get(String columnName); @Override String getKey();  }