@Test void testThrowExceptionGivenVoidList() { assertThrows(IllegalArgumentException.class, () -> { char[] endCharacters = {}; SentenceExtractor extractor = new SentenceExtractor(endCharacters); extractor.constructEndSentencePattern(); }); }
Pattern constructEndSentencePattern() { if (this.fullStopList == null || this.fullStopList.length == 0) { throw new IllegalArgumentException("No end character is specified"); } StringBuilder patternString = new StringBuilder(); generateSimplePattern(this.fullStopList, patternString); patternString.append("["); for (char rightQuotation : rightQuotationList) { patternString.append(rightQuotation); } patternString.append("]?"); return Pattern.compile(patternString.toString()); }
SentenceExtractor { Pattern constructEndSentencePattern() { if (this.fullStopList == null || this.fullStopList.length == 0) { throw new IllegalArgumentException("No end character is specified"); } StringBuilder patternString = new StringBuilder(); generateSimplePattern(this.fullStopList, patternString); patternString.append("["); for (char rightQuotation : rightQuotationList) { patternString.append(rightQuotation); } patternString.append("]?"); return Pattern.compile(patternString.toString()); } }
SentenceExtractor { Pattern constructEndSentencePattern() { if (this.fullStopList == null || this.fullStopList.length == 0) { throw new IllegalArgumentException("No end character is specified"); } StringBuilder patternString = new StringBuilder(); generateSimplePattern(this.fullStopList, patternString); patternString.append("["); for (char rightQuotation : rightQuotationList) { patternString.append(rightQuotation); } patternString.append("]?"); return Pattern.compile(patternString.toString()); } SentenceExtractor(char...fullStopList);  SentenceExtractor(SymbolTable symbolTable);   SentenceExtractor(char[] fullStopList, char[] rightQuotationList); }
SentenceExtractor { Pattern constructEndSentencePattern() { if (this.fullStopList == null || this.fullStopList.length == 0) { throw new IllegalArgumentException("No end character is specified"); } StringBuilder patternString = new StringBuilder(); generateSimplePattern(this.fullStopList, patternString); patternString.append("["); for (char rightQuotation : rightQuotationList) { patternString.append(rightQuotation); } patternString.append("]?"); return Pattern.compile(patternString.toString()); } SentenceExtractor(char...fullStopList);  SentenceExtractor(SymbolTable symbolTable);   SentenceExtractor(char[] fullStopList, char[] rightQuotationList); int extract(String line, List<Pair<Integer, Integer>> sentencePositions); int getSentenceEndPosition(String str); String getBrokenLineSeparator(); }
SentenceExtractor { Pattern constructEndSentencePattern() { if (this.fullStopList == null || this.fullStopList.length == 0) { throw new IllegalArgumentException("No end character is specified"); } StringBuilder patternString = new StringBuilder(); generateSimplePattern(this.fullStopList, patternString); patternString.append("["); for (char rightQuotation : rightQuotationList) { patternString.append(rightQuotation); } patternString.append("]?"); return Pattern.compile(patternString.toString()); } SentenceExtractor(char...fullStopList);  SentenceExtractor(SymbolTable symbolTable);   SentenceExtractor(char[] fullStopList, char[] rightQuotationList); int extract(String line, List<Pair<Integer, Integer>> sentencePositions); int getSentenceEndPosition(String str); String getBrokenLineSeparator();  }