@Test public void testGetStartValue() { TaskSeriesCollection c = createCollection1(); assertEquals(1L, c.getStartValue("S1", "Task 1")); assertEquals(3L, c.getStartValue("S1", "Task 2")); assertEquals(5L, c.getStartValue("S2", "Task 3")); assertEquals(1L, c.getStartValue(0, 0)); assertEquals(3L, c.getStartValue(0, 1)); assertEquals(null, c.getStartValue(0, 2)); assertEquals(null, c.getStartValue(1, 0)); assertEquals(null, c.getStartValue(1, 1)); assertEquals(5L, c.getStartValue(1, 2)); TaskSeriesCollection c3 = createCollection3(); assertEquals((long) 100, c3.getStartValue(0, 0)); assertEquals((long) 220, c3.getStartValue(0, 1)); assertNull(c3.getStartValue(1, 0)); assertEquals((long) 2220, c3.getStartValue(1, 1)); }
@Override public Number getStartValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); if (duration != null) { result = duration.getStart().getTime(); } } return result; }
TaskSeriesCollection extends AbstractSeriesDataset implements GanttCategoryDataset, Cloneable, PublicCloneable,
                   Serializable { @Override public Number getStartValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); if (duration != null) { result = duration.getStart().getTime(); } } return result; } }
TaskSeriesCollection extends AbstractSeriesDataset implements GanttCategoryDataset, Cloneable, PublicCloneable,
                   Serializable { @Override public Number getStartValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); if (duration != null) { result = duration.getStart().getTime(); } } return result; } TaskSeriesCollection(); }
TaskSeriesCollection extends AbstractSeriesDataset implements GanttCategoryDataset, Cloneable, PublicCloneable,
                   Serializable { @Override public Number getStartValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); if (duration != null) { result = duration.getStart().getTime(); } } return result; } TaskSeriesCollection(); TaskSeries getSeries(Comparable key); TaskSeries getSeries(int series); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getRowCount(); @Override List getRowKeys(); @Override int getColumnCount(); @Override List<Comparable> getColumnKeys(); @Override Comparable getColumnKey(int index); @Override int getColumnIndex(Comparable columnKey); @Override int getRowIndex(Comparable rowKey); @Override Comparable getRowKey(int index); void add(TaskSeries series); void remove(TaskSeries series); void remove(int series); void removeAll(); @Override Number getValue(Comparable rowKey, Comparable columnKey); @Override Number getValue(int row, int column); @Override Number getStartValue(Comparable rowKey, Comparable columnKey); @Override Number getStartValue(int row, int column); @Override Number getEndValue(Comparable rowKey, Comparable columnKey); @Override Number getEndValue(int row, int column); @Override Number getPercentComplete(int row, int column); @Override Number getPercentComplete(Comparable rowKey, Comparable columnKey); @Override int getSubIntervalCount(int row, int column); @Override int getSubIntervalCount(Comparable rowKey, Comparable columnKey); @Override Number getStartValue(int row, int column, int subinterval); @Override Number getStartValue(Comparable rowKey, Comparable columnKey,
                                int subinterval); @Override Number getEndValue(int row, int column, int subinterval); @Override Number getEndValue(Comparable rowKey, Comparable columnKey,
                              int subinterval); @Override Number getPercentComplete(int row, int column, int subinterval); @Override Number getPercentComplete(Comparable rowKey, Comparable columnKey,
                                     int subinterval); @Override void seriesChanged(SeriesChangeEvent event); @Override boolean equals(Object obj); @Override Object clone(); }
TaskSeriesCollection extends AbstractSeriesDataset implements GanttCategoryDataset, Cloneable, PublicCloneable,
                   Serializable { @Override public Number getStartValue(Comparable rowKey, Comparable columnKey) { Number result = null; int row = getRowIndex(rowKey); TaskSeries series = this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { TimePeriod duration = task.getDuration(); if (duration != null) { result = duration.getStart().getTime(); } } return result; } TaskSeriesCollection(); TaskSeries getSeries(Comparable key); TaskSeries getSeries(int series); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getRowCount(); @Override List getRowKeys(); @Override int getColumnCount(); @Override List<Comparable> getColumnKeys(); @Override Comparable getColumnKey(int index); @Override int getColumnIndex(Comparable columnKey); @Override int getRowIndex(Comparable rowKey); @Override Comparable getRowKey(int index); void add(TaskSeries series); void remove(TaskSeries series); void remove(int series); void removeAll(); @Override Number getValue(Comparable rowKey, Comparable columnKey); @Override Number getValue(int row, int column); @Override Number getStartValue(Comparable rowKey, Comparable columnKey); @Override Number getStartValue(int row, int column); @Override Number getEndValue(Comparable rowKey, Comparable columnKey); @Override Number getEndValue(int row, int column); @Override Number getPercentComplete(int row, int column); @Override Number getPercentComplete(Comparable rowKey, Comparable columnKey); @Override int getSubIntervalCount(int row, int column); @Override int getSubIntervalCount(Comparable rowKey, Comparable columnKey); @Override Number getStartValue(int row, int column, int subinterval); @Override Number getStartValue(Comparable rowKey, Comparable columnKey,
                                int subinterval); @Override Number getEndValue(int row, int column, int subinterval); @Override Number getEndValue(Comparable rowKey, Comparable columnKey,
                              int subinterval); @Override Number getPercentComplete(int row, int column, int subinterval); @Override Number getPercentComplete(Comparable rowKey, Comparable columnKey,
                                     int subinterval); @Override void seriesChanged(SeriesChangeEvent event); @Override boolean equals(Object obj); @Override Object clone();  }