@Test public void testAdd() { System.out.println("add"); GraphRowOverallAverages instance = new GraphRowOverallAverages(); instance.add(0, 0); assertEquals(0, instance.getKey(), 0.01); assertEquals(0, instance.getValue().getValue(), 0.01); instance.add(1, 1); assertEquals(1, instance.getKey(), 0.01); assertEquals(0.5, instance.getValue().getValue(), 0.01); instance.add(1, 1); assertEquals(1, instance.getKey(), 0.01); assertEquals(0.66, instance.getValue().getValue(), 0.01); instance.add(5, 10); assertEquals(2, instance.getKey(), 0.01); assertEquals(3, instance.getValue().getValue(), 0.01); }
@Override public void add(long xVal, double yVal) { avgX = (avgX * element.getCount() + xVal) / (element.getCount() + 1); element.add(yVal); super.add((long) avgX, element.getValue()); }
GraphRowOverallAverages extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>>,
        Entry<Long, AbstractGraphPanelChartElement> { @Override public void add(long xVal, double yVal) { avgX = (avgX * element.getCount() + xVal) / (element.getCount() + 1); element.add(yVal); super.add((long) avgX, element.getValue()); } }
GraphRowOverallAverages extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>>,
        Entry<Long, AbstractGraphPanelChartElement> { @Override public void add(long xVal, double yVal) { avgX = (avgX * element.getCount() + xVal) / (element.getCount() + 1); element.add(yVal); super.add((long) avgX, element.getValue()); } GraphRowOverallAverages(); }
GraphRowOverallAverages extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>>,
        Entry<Long, AbstractGraphPanelChartElement> { @Override public void add(long xVal, double yVal) { avgX = (avgX * element.getCount() + xVal) / (element.getCount() + 1); element.add(yVal); super.add((long) avgX, element.getValue()); } GraphRowOverallAverages(); @Override void add(long xVal, double yVal); Iterator<Entry<Long, AbstractGraphPanelChartElement>> iterator(); boolean hasNext(); Entry<Long, AbstractGraphPanelChartElement> next(); void remove(); Long getKey(); GraphPanelChartAverageElement getValue(); AbstractGraphPanelChartElement setValue(AbstractGraphPanelChartElement value); @Override int size(); @Override AbstractGraphPanelChartElement getElement(long value); }
GraphRowOverallAverages extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>>,
        Entry<Long, AbstractGraphPanelChartElement> { @Override public void add(long xVal, double yVal) { avgX = (avgX * element.getCount() + xVal) / (element.getCount() + 1); element.add(yVal); super.add((long) avgX, element.getValue()); } GraphRowOverallAverages(); @Override void add(long xVal, double yVal); Iterator<Entry<Long, AbstractGraphPanelChartElement>> iterator(); boolean hasNext(); Entry<Long, AbstractGraphPanelChartElement> next(); void remove(); Long getKey(); GraphPanelChartAverageElement getValue(); AbstractGraphPanelChartElement setValue(AbstractGraphPanelChartElement value); @Override int size(); @Override AbstractGraphPanelChartElement getElement(long value);  }