SimpleXYSeries implements EditableXYSeries, OrderedXYSeries, PlotListener { public XYCoords removeFirst() { lock.writeLock().lock(); try { if (size() <= 0) { throw new NoSuchElementException(); } return new XYCoords(xVals != null ? xVals.removeFirst() : 0, yVals.removeFirst()); } finally { lock.writeLock().unlock(); } } SimpleXYSeries(String title);  SimpleXYSeries(ArrayFormat format, String title, Number... model);  SimpleXYSeries(List<? extends Number> model, ArrayFormat format, String title);  SimpleXYSeries(List<? extends Number> xVals, List<? extends Number> yVals, String title); @Override XOrder getXOrder(); void setXOrder(XOrder xOrder); @Override void onBeforeDraw(Plot source, Canvas canvas); @Override void onAfterDraw(Plot source, Canvas canvas); void useImplicitXVals(); void setModel(List<? extends Number> model, ArrayFormat format); void setX(Number value, int index); void setY(Number value, int index); @Override void resize(int size); void setXY(Number xVal, Number yVal, int index); void addFirst(Number x, Number y); XYCoords removeFirst(); void addLast(Number x, Number y); XYCoords removeLast(); @Override String getTitle(); void setTitle(String title); @Override int size(); @Override Number getX(int index); @Override Number getY(int index); LinkedList<Number> getxVals(); LinkedList<Number> getyVals(); void clear();  }
@Test(expected = NoSuchElementException.class) public void removeFirst_throwsNoSuchElementException_ifEmpty() { new SimpleXYSeries("series").removeFirst(); }