private static String rulesToString(Iterable<Rule> rules) { return StreamSupport.stream(rules.spliterator(), false) .map(r -> "\n// " + r.toString() + "\n.addRule(" + r + ")") .collect(Collectors.joining()); }
public Builder addRules(Iterable<Rule> rules) { rules.forEach(r -> addRule(r)); return this; }