use of org.jowidgets.cap.common.api.filter.IBeanDtoFilter in project jo-client-platform by jo-source.
the class BeanDtoCollectionFilterImpl method filter.
@Override
public ArrayList<IBeanDto> filter(final Collection<? extends IBeanDto> beanDtos, final IFilter filter, final IExecutionCallback executionCallback) {
final IBeanDtoFilter beanDtoFilter = CapCommonToolkit.beanDtoFilter();
final ArrayList<IBeanDto> result = new ArrayList<IBeanDto>();
for (final IBeanDto beanDto : beanDtos) {
CapServiceToolkit.checkCanceled(executionCallback);
if (beanDtoFilter.accept(beanDto, filter)) {
result.add(beanDto);
}
}
return result;
}
Aggregations