code: public static Filter filterArrayToChain(Filter[] filterArray) {
          for (int i = 0; i < (filterArray.length - 1); i++) {
              AbstractFilter thisFilter = (AbstractFilter) filterArray[i];
              thisFilter.setAnd(filterArray[i + 1]);
          }
          AbstractFilter lastFilter = (AbstractFilter) filterArray[filterArray.length - 1];
          lastFilter.setAnd(null);
          return filterArray[0];
      }
docs: Convert an array of <code>AbstractFilter</code> objects to a chain of
  filters by calling the {@link #setAnd} the method of each filter object.
  
  @param filterArray An array of AbstractFilter objects having length
  greater than zero.
  @return The first filter in the chain which will be == to filterArray[0]