Object data = (rowObj instanceof RowInfo)
? ((RowInfo) rowObj).getRowData() // RowInfo for DataTable (for storing original row indexes)
: rowObj; // row data object for TreeTable (for there's no notion of index in TreeTable)
boolean rowAccepted = true;
for (int filterIndex = 0, filterCount = filters.size(); filterIndex < filterCount; filterIndex++) {
Filter filter = filters.get(filterIndex);
FilterCriterion filterValue = (FilterCriterion) filter.getValue();
Predicate predicate = filterValue != null ? PredicateBuilder.build(filterValue) : null;
boolean filterAcceptsData = predicate == null || predicate.evaluate(data);
if (!filterAcceptsData)
rowAccepted = false;