class SRXSentenceTokenizer implements SentenceTokenizer {

  private final SrxDocument srxDocument;
  private final Language language;

  private String parCode;

  /**
   * Build a sentence tokenizer based on the rules in the {@code segment.srx} file
   * that comes with LanguageTool.
   */
  public SRXSentenceTokenizer(Language language) {
    this(language, "/segment.srx");
  }

  /**
   * @param srxInClassPath the path to an SRX file in the classpath 
   * @since 3.2
   */
  public SRXSentenceTokenizer(Language language, String srxInClassPath) {
    this.language = Objects.requireNonNull(language);
    this.srxDocument = SrxTools.createSrxDocument(srxInClassPath);
    setSingleLineBreaksMarksParagraph(false);
  }

  @Override
  public final List<String> tokenize(String text) {
    return SrxTools.tokenize(text, srxDocument, language.getShortCode() + parCode);
  }

  @Override
  public final boolean singleLineBreaksMarksPara() {
    return "_one".equals(parCode);
  }

  /**
   * @param lineBreakParagraphs if <code>true</code>, single lines breaks are assumed to end a
   *   paragraph; if <code>false</code>, only two ore more consecutive line breaks end a paragraph
   */
  @Override
  public final void setSingleLineBreaksMarksParagraph(boolean lineBreakParagraphs) {<FILL_FUNCTION_BODY>}

}

    if (lineBreakParagraphs) {
      parCode = "_one";
    } else {
      parCode = "_two";
    }
  
<no_super_class>