public void addRule(@NotNull Rule rule) throws IllegalArgumentException {
    Rule existing = myRules.get(rule.symbol);
    if (existing != null) {
      throw new IllegalArgumentException(String.format(
        "Can't register given wrap rule (%s) within the current line wrap position strategy. Reason: another rule is already "
        + "registered for it - '%s'", rule, existing
      ));
    }
    existing = myRules.put(rule.symbol, rule);
    assert existing == null;
  }
public void addRule(@NotNull Rule rule)