boolean (Collection addedContent, IChoicesParser parser) { boolean changed = false; for (Object o : addedContent) { String s = null; if (o == null) { o = CustomChoice.MATCH_EMPTY; } else if (!renderedContent && !(o instanceof CustomChoice)) { // if null, content is rendered, no need to handle strings s = (format == null) ? o.toString() : format.format(o); if (s.length() == 0) { o = CustomChoice.MATCH_EMPTY; } else { s = parser.escapeChoice(s); } } changed = content.add(new Choice(o, s)) || changed; } if (changed) { flatContent = null; alphaSortedContent = null; fireContentsChanged(this, 0, size = content.size()); } return changed; }