@Test public void testGetColumnKeys() { DefaultCategoryDataset underlying = new DefaultCategoryDataset(); underlying.addValue(1.0, "R1", "C1"); underlying.addValue(2.0, "R1", "C2"); underlying.addValue(3.0, "R1", "C3"); underlying.addValue(4.0, "R1", "C4"); SlidingCategoryDataset dataset = new SlidingCategoryDataset(underlying, 1, 2); List keys = dataset.getColumnKeys(); assertTrue(keys.contains("C2")); assertTrue(keys.contains("C3")); assertEquals(2, keys.size()); dataset.setFirstCategoryIndex(3); keys = dataset.getColumnKeys(); assertTrue(keys.contains("C4")); assertEquals(1, keys.size()); }
@Override public List<Comparable> getColumnKeys() { List<Comparable> result = new java.util.ArrayList<Comparable>(); int last = lastCategoryIndex(); for (int i = this.firstCategoryIndex; i <= last; i++) { result.add(this.underlying.getColumnKey(i)); } return Collections.unmodifiableList(result); }
SlidingCategoryDataset extends AbstractDataset implements CategoryDataset { @Override public List<Comparable> getColumnKeys() { List<Comparable> result = new java.util.ArrayList<Comparable>(); int last = lastCategoryIndex(); for (int i = this.firstCategoryIndex; i <= last; i++) { result.add(this.underlying.getColumnKey(i)); } return Collections.unmodifiableList(result); } }
SlidingCategoryDataset extends AbstractDataset implements CategoryDataset { @Override public List<Comparable> getColumnKeys() { List<Comparable> result = new java.util.ArrayList<Comparable>(); int last = lastCategoryIndex(); for (int i = this.firstCategoryIndex; i <= last; i++) { result.add(this.underlying.getColumnKey(i)); } return Collections.unmodifiableList(result); } SlidingCategoryDataset(CategoryDataset underlying, int firstColumn,
            int maxColumns); }
SlidingCategoryDataset extends AbstractDataset implements CategoryDataset { @Override public List<Comparable> getColumnKeys() { List<Comparable> result = new java.util.ArrayList<Comparable>(); int last = lastCategoryIndex(); for (int i = this.firstCategoryIndex; i <= last; i++) { result.add(this.underlying.getColumnKey(i)); } return Collections.unmodifiableList(result); } SlidingCategoryDataset(CategoryDataset underlying, int firstColumn,
            int maxColumns); CategoryDataset getUnderlyingDataset(); int getFirstCategoryIndex(); void setFirstCategoryIndex(int first); int getMaximumCategoryCount(); void setMaximumCategoryCount(int max); @Override int getColumnIndex(Comparable key); @Override Comparable getColumnKey(int column); @Override List<Comparable> getColumnKeys(); @Override int getRowIndex(Comparable key); @Override Comparable getRowKey(int row); @Override List<Comparable> getRowKeys(); @Override Number getValue(Comparable rowKey, Comparable columnKey); @Override int getColumnCount(); @Override int getRowCount(); @Override Number getValue(int row, int column); @Override boolean equals(Object obj); @Override Object clone(); }
SlidingCategoryDataset extends AbstractDataset implements CategoryDataset { @Override public List<Comparable> getColumnKeys() { List<Comparable> result = new java.util.ArrayList<Comparable>(); int last = lastCategoryIndex(); for (int i = this.firstCategoryIndex; i <= last; i++) { result.add(this.underlying.getColumnKey(i)); } return Collections.unmodifiableList(result); } SlidingCategoryDataset(CategoryDataset underlying, int firstColumn,
            int maxColumns); CategoryDataset getUnderlyingDataset(); int getFirstCategoryIndex(); void setFirstCategoryIndex(int first); int getMaximumCategoryCount(); void setMaximumCategoryCount(int max); @Override int getColumnIndex(Comparable key); @Override Comparable getColumnKey(int column); @Override List<Comparable> getColumnKeys(); @Override int getRowIndex(Comparable key); @Override Comparable getRowKey(int row); @Override List<Comparable> getRowKeys(); @Override Number getValue(Comparable rowKey, Comparable columnKey); @Override int getColumnCount(); @Override int getRowCount(); @Override Number getValue(int row, int column); @Override boolean equals(Object obj); @Override Object clone();  }