@Test public void testGetRangeLowerBound() { XYSeriesCollection dataset = new XYSeriesCollection(); assertTrue(Double.isNaN(dataset.getRangeLowerBound(false))); assertTrue(Double.isNaN(dataset.getRangeLowerBound(true))); XYSeries series = new XYSeries("S1"); dataset.addSeries(series); assertTrue(Double.isNaN(dataset.getRangeLowerBound(false))); assertTrue(Double.isNaN(dataset.getRangeLowerBound(true))); series.add(1.0, 1.1); assertEquals(1.1, dataset.getRangeLowerBound(false), EPSILON); assertEquals(1.1, dataset.getRangeLowerBound(true), EPSILON); series.add(-1.0, -1.1); assertEquals(-1.1, dataset.getRangeLowerBound(false), EPSILON); assertEquals(-1.1, dataset.getRangeLowerBound(true), EPSILON); series.add(0.0, null); assertEquals(-1.1, dataset.getRangeLowerBound(false), EPSILON); assertEquals(-1.1, dataset.getRangeLowerBound(true), EPSILON); XYSeries s2 = new XYSeries("S2"); dataset.addSeries(s2); assertEquals(-1.1, dataset.getRangeLowerBound(false), EPSILON); assertEquals(-1.1, dataset.getRangeLowerBound(true), EPSILON); s2.add(2.0, 5.0); assertEquals(-1.1, dataset.getRangeLowerBound(false), EPSILON); assertEquals(-1.1, dataset.getRangeLowerBound(true), EPSILON); }
@Override public double getRangeLowerBound(boolean includeInterval) { double result = Double.NaN; int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { XYSeries series = getSeries(s); double lowY = series.getMinY(); if (Double.isNaN(result)) { result = lowY; } else { if (!Double.isNaN(lowY)) { result = Math.min(result, lowY); } } } return result; }
XYSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, DomainInfo, RangeInfo, 
        VetoableChangeListener, PublicCloneable, Serializable { @Override public double getRangeLowerBound(boolean includeInterval) { double result = Double.NaN; int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { XYSeries series = getSeries(s); double lowY = series.getMinY(); if (Double.isNaN(result)) { result = lowY; } else { if (!Double.isNaN(lowY)) { result = Math.min(result, lowY); } } } return result; } }
XYSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, DomainInfo, RangeInfo, 
        VetoableChangeListener, PublicCloneable, Serializable { @Override public double getRangeLowerBound(boolean includeInterval) { double result = Double.NaN; int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { XYSeries series = getSeries(s); double lowY = series.getMinY(); if (Double.isNaN(result)) { result = lowY; } else { if (!Double.isNaN(lowY)) { result = Math.min(result, lowY); } } } return result; } XYSeriesCollection();  XYSeriesCollection(XYSeries series); }
XYSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, DomainInfo, RangeInfo, 
        VetoableChangeListener, PublicCloneable, Serializable { @Override public double getRangeLowerBound(boolean includeInterval) { double result = Double.NaN; int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { XYSeries series = getSeries(s); double lowY = series.getMinY(); if (Double.isNaN(result)) { result = lowY; } else { if (!Double.isNaN(lowY)) { result = Math.min(result, lowY); } } } return result; } XYSeriesCollection();  XYSeriesCollection(XYSeries series); @Override DomainOrder getDomainOrder(); void addSeries(XYSeries series); void removeSeries(int series); void removeSeries(XYSeries series); void removeAllSeries(); @Override int getSeriesCount(); List<XYSeries> getSeries(); int indexOf(XYSeries series); XYSeries getSeries(int series); XYSeries getSeries(Comparable key); @Override Comparable getSeriesKey(int series); int getSeriesIndex(Comparable key); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override Number getY(int series, int index); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); @Override boolean equals(Object obj); @Override Object clone(); @Override int hashCode(); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); double getIntervalWidth(); void setIntervalWidth(double width); double getIntervalPositionFactor(); void setIntervalPositionFactor(double factor); boolean isAutoWidth(); void setAutoWidth(boolean b); @Override Range getRangeBounds(boolean includeInterval); @Override double getRangeLowerBound(boolean includeInterval); @Override double getRangeUpperBound(boolean includeInterval); @Override void vetoableChange(PropertyChangeEvent e); }
XYSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, DomainInfo, RangeInfo, 
        VetoableChangeListener, PublicCloneable, Serializable { @Override public double getRangeLowerBound(boolean includeInterval) { double result = Double.NaN; int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { XYSeries series = getSeries(s); double lowY = series.getMinY(); if (Double.isNaN(result)) { result = lowY; } else { if (!Double.isNaN(lowY)) { result = Math.min(result, lowY); } } } return result; } XYSeriesCollection();  XYSeriesCollection(XYSeries series); @Override DomainOrder getDomainOrder(); void addSeries(XYSeries series); void removeSeries(int series); void removeSeries(XYSeries series); void removeAllSeries(); @Override int getSeriesCount(); List<XYSeries> getSeries(); int indexOf(XYSeries series); XYSeries getSeries(int series); XYSeries getSeries(Comparable key); @Override Comparable getSeriesKey(int series); int getSeriesIndex(Comparable key); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override Number getY(int series, int index); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); @Override boolean equals(Object obj); @Override Object clone(); @Override int hashCode(); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); double getIntervalWidth(); void setIntervalWidth(double width); double getIntervalPositionFactor(); void setIntervalPositionFactor(double factor); boolean isAutoWidth(); void setAutoWidth(boolean b); @Override Range getRangeBounds(boolean includeInterval); @Override double getRangeLowerBound(boolean includeInterval); @Override double getRangeUpperBound(boolean includeInterval); @Override void vetoableChange(PropertyChangeEvent e);  }