Iterator tableIterator = getTables().iterator(); while (tableIterator.hasNext()) { db.addTable((Table) tableIterator.next());
for (Iterator it = getTables().iterator(); it.hasNext();) { db.addTable((Table)it.next());
    public Database getDatabase() throws SQLException {        Database db = new Database();        // Get the database MetaData.        Iterator tableIterator = getTables().iterator();        while (tableIterator.hasNext()) {            db.addTable((Table) tableIterator.next());        }        return db;    }