System.out.println(filter.toString());
}
CascadedTable ft = new CascadedTable(t, filter);
TableIterator iter = ft.iterator();
while ( iter.hasNext() ) {
int row = iter.nextInt();
try {
for (int c = 0; c < NCOLS; ++c) {
Object o1 = TABLE[c][ft.getColumnRow(row,c)];
Object o2 = ft.get(row,HEADERS[c]);
assertEquals(o1, o2);
}
} catch (Exception e) {
fail("Caught exception: " + e);
}
}
// add an extra column to the cascaded table
String name = "test";
ft.addColumn(name, double.class, new Double(Math.PI));
iter = ft.iterator();
while (iter.hasNext()) {
int row = iter.nextInt();
iter.setDouble(name, Math.E);
assertTrue(Math.E == ft.getDouble(row, name));
}
int nr = t.addRow();
t.setInt(nr, HEADERS[0], nr+1);