@Test public void testExtractDataFromLineTwoPatterns() throws Exception { InfoFieldParser parser = new InfoFieldParser(PATTERN2 + "," + PATTERN); List<String> result = parser.extractDataFromLine(EXTENDED_INFO_VALUE); Assert.assertEquals(4, result.size()); }
public List<String> extractDataFromLine(String line) { for (InfoPattern pattern : patterns) { List<String> data = pattern.extractDataFromLine(line); if (!data.isEmpty()) { return data; } } return Collections.emptyList(); }
InfoFieldParser { public List<String> extractDataFromLine(String line) { for (InfoPattern pattern : patterns) { List<String> data = pattern.extractDataFromLine(line); if (!data.isEmpty()) { return data; } } return Collections.emptyList(); } }
InfoFieldParser { public List<String> extractDataFromLine(String line) { for (InfoPattern pattern : patterns) { List<String> data = pattern.extractDataFromLine(line); if (!data.isEmpty()) { return data; } } return Collections.emptyList(); } InfoFieldParser(final String templates); }
InfoFieldParser { public List<String> extractDataFromLine(String line) { for (InfoPattern pattern : patterns) { List<String> data = pattern.extractDataFromLine(line); if (!data.isEmpty()) { return data; } } return Collections.emptyList(); } InfoFieldParser(final String templates); boolean isExtendedInfoField(String line); List<String> extractHeaderFromLine(String line); List<String> extractDataFromLine(String line); }
InfoFieldParser { public List<String> extractDataFromLine(String line) { for (InfoPattern pattern : patterns) { List<String> data = pattern.extractDataFromLine(line); if (!data.isEmpty()) { return data; } } return Collections.emptyList(); } InfoFieldParser(final String templates); boolean isExtendedInfoField(String line); List<String> extractHeaderFromLine(String line); List<String> extractDataFromLine(String line);  }