RowFilter (final Object right, final int modelIndex, final Comparator comparator) { return new RowFilter() { @Override public boolean include(Entry entry) { Object left = entry.getValue(modelIndex); if (left instanceof String) { left = htmlHandler.stripHtml((String)left); } return (left != null) && matches(comparator.compare(left, right)); } }; }