@Test public void testGetElement() { System.out.println("getElement"); long value = 100L; GraphRowExactValues instance = new GraphRowExactValues(); AbstractGraphPanelChartElement expResult = new GraphPanelChartExactElement(value, 2); instance.add(value, 2); AbstractGraphPanelChartElement result = instance.getElement(value); Assert.assertTrue(instance.getElement(value).getValue() == expResult.getValue()); }
@Override public AbstractGraphPanelChartElement getElement(long value) { AbstractGraphPanelChartElement ret = null; Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator(); while (it.hasNext() && ret == null) { GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue(); if (el.getX() == value) { ret = el; } } return ret; }
GraphRowExactValues extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>> { @Override public AbstractGraphPanelChartElement getElement(long value) { AbstractGraphPanelChartElement ret = null; Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator(); while (it.hasNext() && ret == null) { GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue(); if (el.getX() == value) { ret = el; } } return ret; } }
GraphRowExactValues extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>> { @Override public AbstractGraphPanelChartElement getElement(long value) { AbstractGraphPanelChartElement ret = null; Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator(); while (it.hasNext() && ret == null) { GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue(); if (el.getX() == value) { ret = el; } } return ret; } GraphRowExactValues(); }
GraphRowExactValues extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>> { @Override public AbstractGraphPanelChartElement getElement(long value) { AbstractGraphPanelChartElement ret = null; Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator(); while (it.hasNext() && ret == null) { GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue(); if (el.getX() == value) { ret = el; } } return ret; } GraphRowExactValues(); @Override void add(long xVal, double yVal); @Override Iterator<Entry<Long, AbstractGraphPanelChartElement>> iterator(); boolean hasNext(); Entry<Long, AbstractGraphPanelChartElement> next(); void remove(); @Override int size(); @Override AbstractGraphPanelChartElement getElement(long value); }
GraphRowExactValues extends AbstractGraphRow implements Iterator<Entry<Long, AbstractGraphPanelChartElement>> { @Override public AbstractGraphPanelChartElement getElement(long value) { AbstractGraphPanelChartElement ret = null; Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator(); while (it.hasNext() && ret == null) { GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue(); if (el.getX() == value) { ret = el; } } return ret; } GraphRowExactValues(); @Override void add(long xVal, double yVal); @Override Iterator<Entry<Long, AbstractGraphPanelChartElement>> iterator(); boolean hasNext(); Entry<Long, AbstractGraphPanelChartElement> next(); void remove(); @Override int size(); @Override AbstractGraphPanelChartElement getElement(long value);  }