code: private void setScanCriteria(Scan scan, String columnFamily, List<Map<String, Object>> columnsToOutput,
              Filter filter)
      {
          if (filter != null)
          {
              scan.setFilter(filter);
          }
      }
docs: Sets the scan criteria.
  
  @param scan
  the scan
  @param columnFamily
  the column family
  @param columnsToOutput
  the columns to output
  @param filter
  the filter