@Test public void testGetMaxY() { System.out.println("getMaxY"); instance.add(1000, 3); instance.add(1000, 2); instance.add(1000, 1); double expResult = 2.0; double[] result = instance.getMinMaxY(-1); Assert.assertEquals(expResult, result[1], 0.0); }
@Override public void add(long xVal, double yVal) { GraphPanelChartAverageElement el; if (values.containsKey(xVal)) { el = (GraphPanelChartAverageElement) values.get(xVal); el.add(yVal); yVal = el.getValue(); } else { el = new GraphPanelChartAverageElement(yVal); values.put(xVal, el); } super.add(xVal, yVal); }
GraphRowAverages extends AbstractGraphRow { @Override public void add(long xVal, double yVal) { GraphPanelChartAverageElement el; if (values.containsKey(xVal)) { el = (GraphPanelChartAverageElement) values.get(xVal); el.add(yVal); yVal = el.getValue(); } else { el = new GraphPanelChartAverageElement(yVal); values.put(xVal, el); } super.add(xVal, yVal); } }
GraphRowAverages extends AbstractGraphRow { @Override public void add(long xVal, double yVal) { GraphPanelChartAverageElement el; if (values.containsKey(xVal)) { el = (GraphPanelChartAverageElement) values.get(xVal); el.add(yVal); yVal = el.getValue(); } else { el = new GraphPanelChartAverageElement(yVal); values.put(xVal, el); } super.add(xVal, yVal); } GraphRowAverages(); }
GraphRowAverages extends AbstractGraphRow { @Override public void add(long xVal, double yVal) { GraphPanelChartAverageElement el; if (values.containsKey(xVal)) { el = (GraphPanelChartAverageElement) values.get(xVal); el.add(yVal); yVal = el.getValue(); } else { el = new GraphPanelChartAverageElement(yVal); values.put(xVal, el); } super.add(xVal, yVal); } GraphRowAverages(); @Override void add(long xVal, double yVal); @Override Iterator<Entry<Long, AbstractGraphPanelChartElement>> iterator(); @Override int size(); @Override AbstractGraphPanelChartElement getElement(long value); @Override AbstractGraphPanelChartElement getLowerElement(long value); }
GraphRowAverages extends AbstractGraphRow { @Override public void add(long xVal, double yVal) { GraphPanelChartAverageElement el; if (values.containsKey(xVal)) { el = (GraphPanelChartAverageElement) values.get(xVal); el.add(yVal); yVal = el.getValue(); } else { el = new GraphPanelChartAverageElement(yVal); values.put(xVal, el); } super.add(xVal, yVal); } GraphRowAverages(); @Override void add(long xVal, double yVal); @Override Iterator<Entry<Long, AbstractGraphPanelChartElement>> iterator(); @Override int size(); @Override AbstractGraphPanelChartElement getElement(long value); @Override AbstractGraphPanelChartElement getLowerElement(long value);  }