RowSubset extends AbstractDataSource implements DataListener { public Comparable<?> get(int col, int row) { int rowOrig = accepted.get(row); return original.get(col, rowOrig); } @SuppressWarnings("unchecked")  RowSubset(DataSource original); @Override Row getRow(int row); Comparable<?> get(int col, int row); @Override int getColumnCount(); int getRowCount(); @Override Class<? extends Comparable<?>>[] getColumnTypes(); void dataAdded(DataSource source, DataChangeEvent... events); void dataUpdated(DataSource source, DataChangeEvent... events); void dataRemoved(DataSource source, DataChangeEvent... events); abstract boolean accept(Row row);  }
@Test public void testGetIntInt() { assertEquals( 2, data.get(0, 0)); assertEquals( 4, data.get(0, 1)); assertEquals( 6, data.get(0, 2)); assertEquals( 8, data.get(0, 3)); assertEquals( 3, data.get(1, 0)); assertEquals( 6, data.get(1, 1)); assertEquals( 8, data.get(1, 2)); assertEquals(11, data.get(1, 3)); }