class ChineseSentenceTokenizer implements SentenceTokenizer {

  @Override
  public List<String> tokenize(String text) {<FILL_FUNCTION_BODY>}

  /** Note: does have no effect for Chinese */
  @Override
  public void setSingleLineBreaksMarksParagraph(boolean lineBreakParagraphs) {
  }

  /** Note: will always return {@code false} */
  @Override
  public boolean singleLineBreaksMarksPara() {
    return false;
  }
}

    List<String> result = new ArrayList<>();
    StringBuilder whitespace = new StringBuilder();
    StringBuilder nonWhitespace = new StringBuilder();
    // SentencesUtil.toSentenceList() ignores whitespace, so we add it ourselves so match positions are not messed up:
    for (int i = 0; i < text.length(); i++) {
      if (Character.isWhitespace(text.charAt(i))) {
        if (nonWhitespace.length() > 0) {
          result.addAll(SentencesUtil.toSentenceList(nonWhitespace.toString()));
          nonWhitespace.setLength(0);
        }
        whitespace.append(text.charAt(i));  // keep collecting whitespaces
      } else {
        if (whitespace.length() > 0) {
          result.add(whitespace.toString());
          whitespace.setLength(0);
        }
        nonWhitespace.append(text.charAt(i));
      }
    }
    if (whitespace.length() > 0) {
      result.add(whitespace.toString());
    }
    if (nonWhitespace.length() > 0) {
      result.addAll(SentencesUtil.toSentenceList(nonWhitespace.toString()));
    }
    return result;
  
<no_super_class>