@Test(expected = NoSuchElementException.class) public void removeLast_throwsNoSuchElementException_ifEmpty() { new SimpleXYSeries("series").removeLast(); }
public XYCoords removeLast() { lock.writeLock().lock(); try { if (size() <= 0) { throw new NoSuchElementException(); } return new XYCoords(xVals != null ? xVals.removeLast() : yVals.size() - 1, yVals.removeLast()); } finally { lock.writeLock().unlock(); } }
SimpleXYSeries implements EditableXYSeries, OrderedXYSeries, PlotListener { public XYCoords removeLast() { lock.writeLock().lock(); try { if (size() <= 0) { throw new NoSuchElementException(); } return new XYCoords(xVals != null ? xVals.removeLast() : yVals.size() - 1, yVals.removeLast()); } finally { lock.writeLock().unlock(); } } }
SimpleXYSeries implements EditableXYSeries, OrderedXYSeries, PlotListener { public XYCoords removeLast() { lock.writeLock().lock(); try { if (size() <= 0) { throw new NoSuchElementException(); } return new XYCoords(xVals != null ? xVals.removeLast() : yVals.size() - 1, yVals.removeLast()); } 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); }
SimpleXYSeries implements EditableXYSeries, OrderedXYSeries, PlotListener { public XYCoords removeLast() { lock.writeLock().lock(); try { if (size() <= 0) { throw new NoSuchElementException(); } return new XYCoords(xVals != null ? xVals.removeLast() : yVals.size() - 1, yVals.removeLast()); } 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(); }
SimpleXYSeries implements EditableXYSeries, OrderedXYSeries, PlotListener { public XYCoords removeLast() { lock.writeLock().lock(); try { if (size() <= 0) { throw new NoSuchElementException(); } return new XYCoords(xVals != null ? xVals.removeLast() : yVals.size() - 1, yVals.removeLast()); } 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();  }