class ThemisCpUtil {

  public static void processFilters(Filter filter, FilterCallable callable) throws IOException {
    if (filter != null) {
      if (filter instanceof FilterList) {
        FilterList filterList = (FilterList) filter;
        if (!callable.processFilterListOperator(filterList.getOperator())) {
          return;
        }
        for (Filter filterInList : filterList.getFilters()) {
          processFilters(filterInList, callable);
        }
      } else {
        callable.processConcreteFilter(filter);
      }
    }
  }

}