@Test public void testGetLastDataPoint() { cm = new ChartModel(FOO, BAR); long time = System.currentTimeMillis(); cm.addDataPoint(time) .data(FOO, VALUES1[0]) .data(BAR, VALUES2[0]); cm.addDataPoint(time + 1) .data(FOO, VALUES1[1]) .data(BAR, VALUES2[1]); assertEquals("Wrong result", VALUES1[1], cm.getLastDataPoint().get(FOO)); assertEquals("Wrong result", VALUES2[1], cm.getLastDataPoint().get(BAR)); }
public DataPoint getLastDataPoint() { return dataPoints.get(dataPoints.size() - 1); }
ChartModel { public DataPoint getLastDataPoint() { return dataPoints.get(dataPoints.size() - 1); } }
ChartModel { public DataPoint getLastDataPoint() { return dataPoints.get(dataPoints.size() - 1); } ChartModel(String... series); }
ChartModel { public DataPoint getLastDataPoint() { return dataPoints.get(dataPoints.size() - 1); } ChartModel(String... series); int seriesCount(); DataPoint addDataPoint(Object label); String[] getSeries(); DataPoint[] getDataPoints(); Object[] getLabels(); int dataPointCount(); DataPoint getLastDataPoint(); void addAnnotation(String key, Object value); Collection<Annot> getAnnotations(); }
ChartModel { public DataPoint getLastDataPoint() { return dataPoints.get(dataPoints.size() - 1); } ChartModel(String... series); int seriesCount(); DataPoint addDataPoint(Object label); String[] getSeries(); DataPoint[] getDataPoints(); Object[] getLabels(); int dataPointCount(); DataPoint getLastDataPoint(); void addAnnotation(String key, Object value); Collection<Annot> getAnnotations();  }