The standard constructor accepts data in a two dimensional array where the first dimension is the series, and the second dimension is the category.
359360361362363364365366367368
/** * Some checks for the getSeriesCount() method. */ public void testGetSeriesCount() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(0, empty.getSeriesCount()); }
370371372373374375376377378379
/** * Some checks for the getCategoryCount() method. */ public void testGetCategoryCount() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(0, empty.getCategoryCount()); }
381382383384385386387388389390
/** * Some checks for the getSeriesIndex() method. */ public void testGetSeriesIndex() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(-1, empty.getSeriesIndex("ABC")); }
392393394395396397398399400401
/** * Some checks for the getRowIndex() method. */ public void testGetRowIndex() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(-1, empty.getRowIndex("ABC")); }
403404405406407408409410411412413414415416417418
/** * Some checks for the setSeriesKeys() method. */ public void testSetSeriesKeys() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); boolean pass = true; try { empty.setSeriesKeys(new String[0]); } catch (RuntimeException e) { pass = false; } assertTrue(pass);
421422423424425426427428429430
/** * Some checks for the getCategoryIndex() method. */ public void testGetCategoryIndex() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(-1, empty.getCategoryIndex("ABC")); }
432433434435436437438439440441
/** * Some checks for the getColumnIndex() method. */ public void testGetColumnIndex() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(-1, empty.getColumnIndex("ABC")); }
443444445446447448449450451452453454455456457458
/** * Some checks for the setCategoryKeys() method. */ public void testSetCategoryKeys() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); boolean pass = true; try { empty.setCategoryKeys(new String[0]); } catch (RuntimeException e) { pass = false; } assertTrue(pass);
461462463464465466467468469470471
/** * Some checks for the getColumnKeys() method. */ public void testGetColumnKeys() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); List keys = empty.getColumnKeys(); assertEquals(0, keys.size()); }
473474475476477478479480481482483
/** * Some checks for the getRowKeys() method. */ public void testGetRowKeys() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); List keys = empty.getRowKeys(); assertEquals(0, keys.size()); }