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); } boolean value = (left != null) && (0 == comparator.compare(left, right)); return value == expected; } }; }