@Test public void should_return_char_with_more_priority() { final Separator semiColonSeparator = new Separator(';'); final Separator commaSeparator = new Separator(','); final Separator spaceSeparator = new Separator(' '); final Separator tabulationSeparator = new Separator('\t'); final Separator invalidSeparator = new Separator('A'); SeparatorAnalyzer separatorAnalyzer = new SeparatorAnalyzer(1, Collections.emptyList()); assertTrue(separatorAnalyzer.compare(semiColonSeparator, commaSeparator) < 0); assertTrue(separatorAnalyzer.compare(commaSeparator, tabulationSeparator) < 0); assertTrue(separatorAnalyzer.compare(tabulationSeparator, spaceSeparator) < 0); assertTrue(separatorAnalyzer.compare(spaceSeparator, invalidSeparator) < 0); }
public int compare(Separator s1, Separator s2) { return comparator.compare(s1, s2); }
SeparatorAnalyzer implements Consumer<Separator> { public int compare(Separator s1, Separator s2) { return comparator.compare(s1, s2); } }
SeparatorAnalyzer implements Consumer<Separator> { public int compare(Separator s1, Separator s2) { return comparator.compare(s1, s2); } SeparatorAnalyzer(int numberOfLines, List<String> sampleLines); }
SeparatorAnalyzer implements Consumer<Separator> { public int compare(Separator s1, Separator s2) { return comparator.compare(s1, s2); } SeparatorAnalyzer(int numberOfLines, List<String> sampleLines); @Override void accept(Separator separator); int compare(Separator s1, Separator s2); }
SeparatorAnalyzer implements Consumer<Separator> { public int compare(Separator s1, Separator s2) { return comparator.compare(s1, s2); } SeparatorAnalyzer(int numberOfLines, List<String> sampleLines); @Override void accept(Separator separator); int compare(Separator s1, Separator s2);  }