private static ITable[] combineTables(IDataSet[] dataSets) throws DataSetException
private ITable[] combineTables(IDataSet[] dataSets) throws DataSetException
    private static ITable[] combineTables(IDataSet[] dataSets)            throws DataSetException    {        List tableList = new ArrayList();        // process each dataset        for (int i = 0; i < dataSets.length; i++)        {            // process each table            ITable[] tables = DataSetUtils.getTables(dataSets[i]);            for (int j = 0; j < tables.length; j++)            {                // search table in list                ITable table = tables[j];                int index = getTableIndex(                        table.getTableMetaData().getTableName(), tableList);                // not found, add new table in list                if (index == -1)                {                    tableList.add(table);                }                // found so combine them together                else                {                    table = new CompositeTable((ITable)tableList.get(index),                            table);                    tableList.set(index, table);                }            }        }        return (ITable[])tableList.toArray(new ITable[0]);    }