class WhitespaceCheckFilter extends RuleFilter  {

  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> arguments, int patternTokenPos,
                                   AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) {<FILL_FUNCTION_BODY>}

}

    String wsChar = getRequired("whitespaceChar", arguments);
    int pos = Integer.parseInt(getRequired("position", arguments));
    if (pos < 1 || pos > patternTokens.length) {
      throw new IllegalArgumentException("Wrong position in WhitespaceCheckFilter: " + pos + ", must be 1 to " + patternTokens.length);
    }
    if (!patternTokens[pos - 1].getWhitespaceBefore().equals(wsChar)) {
      return match;
    } else {
      return null;
    }
  
<methods>public non-sealed void <init>() ,public abstract org.languagetool.rules.RuleMatch acceptRuleMatch(org.languagetool.rules.RuleMatch, Map<java.lang.String,java.lang.String>, int, org.languagetool.AnalyzedTokenReadings[], List<java.lang.Integer>) throws java.io.IOException,public boolean matches(Map<java.lang.String,java.lang.String>, org.languagetool.AnalyzedTokenReadings[], int, List<java.lang.Integer>) throws java.io.IOException<variables>