code: public static void selectRules(JLanguageTool lt, List<String> disabledRuleIds, List<String> enabledRuleIds, boolean useEnabledOnly) {
      Set<String> disabledRuleIdsSet = new HashSet<>();
      disabledRuleIdsSet.addAll(disabledRuleIds);
      Set<String> enabledRuleIdsSet = new HashSet<>();
      enabledRuleIdsSet.addAll(enabledRuleIds);
      selectRules(lt, Collections.emptySet(), Collections.emptySet(), disabledRuleIdsSet, enabledRuleIdsSet, useEnabledOnly);
    }
docs: Enable and disable rules of the given LanguageTool instance.
  @param lt LanguageTool object
  @param disabledRuleIds ids of the rules to be disabled
  @param enabledRuleIds ids of the rules to be enabled
  @param useEnabledOnly if set to {@code true}, disable all rules except those enabled explicitly