CSVRow { public boolean hasEntry(T csvColumn) { return lineByHeader.containsKey(csvColumn.name()); } CSVRow(ImmutableMap<String, String> lineByHeader); boolean hasEntry(T csvColumn); String parse(T csvColumn); Integer parseInt(T csvColumn); Double parseDouble(T csvColumn); BigDecimal parseBigDecimal(T csvColumn); @Nullable Boolean parseBoolean(T csvColumn); E parseEnum(T csvColumn, Class<E> enumClass); final ImmutableMap<String, String> lineByHeader; }
@Test void testHasEntry() { Assertions.assertTrue(FULL_ROW.hasEntry(TestCSVColumn.DOUBLE)); Assertions.assertFalse(FULL_ROW.hasEntry(TestCSVColumn.MISSING)); }