public class SimpleHistogramDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, Cloneable, PublicCloneable, Serializable
HistogramDataset,
Serialized Form| Constructor and Description |
|---|
SimpleHistogramDataset(Comparable key)
Creates a new histogram dataset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBin(SimpleHistogramBin bin)
Adds a bin to the dataset.
|
void |
addObservation(double value)
Adds an observation to the dataset (by incrementing the item count for
the appropriate bin).
|
void |
addObservation(double value,
boolean notify)
Adds an observation to the dataset (by incrementing the item count for
the appropriate bin).
|
void |
addObservations(double[] values)
Adds a set of values to the dataset and sends a
DatasetChangeEvent to all registered listeners. |
void |
clearObservations()
Removes all current observation data and sends a
DatasetChangeEvent to all registered listeners. |
Object |
clone()
Returns a clone of the dataset.
|
boolean |
equals(Object obj)
Compares the dataset for equality with an arbitrary object.
|
boolean |
getAdjustForBinSize()
Returns a flag that controls whether or not the bin count is divided by
the bin size in the
getXValue(int, int) method. |
DomainOrder |
getDomainOrder()
Returns the order of the domain (or X) values returned by the dataset.
|
Number |
getEndX(int series,
int item)
Returns the ending X value for the specified series and item.
|
double |
getEndXValue(int series,
int item)
Returns the end x-value (as a double primitive) for an item within a
series.
|
Number |
getEndY(int series,
int item)
Returns the ending Y value for the specified series and item.
|
double |
getEndYValue(int series,
int item)
Returns the end y-value (as a double primitive) for an item within a
series.
|
int |
getItemCount(int series)
Returns the number of items in a series.
|
int |
getSeriesCount()
Returns the number of series in the dataset (always 1 for this dataset).
|
Comparable |
getSeriesKey(int series)
Returns the key for a series.
|
Number |
getStartX(int series,
int item)
Returns the starting X value for the specified series and item.
|
double |
getStartXValue(int series,
int item)
Returns the start x-value (as a double primitive) for an item within a
series.
|
Number |
getStartY(int series,
int item)
Returns the starting Y value for the specified series and item.
|
double |
getStartYValue(int series,
int item)
Returns the start y-value (as a double primitive) for an item within a
series.
|
Number |
getX(int series,
int item)
Returns the x-value for an item within a series.
|
double |
getXValue(int series,
int item)
Returns the x-value (as a double primitive) for an item within a series.
|
Number |
getY(int series,
int item)
Returns the y-value for an item within a series.
|
double |
getYValue(int series,
int item)
Returns the y-value (as a double primitive) for an item within a series.
|
void |
removeAllBins()
Removes all bins and sends a
DatasetChangeEvent to all
registered listeners. |
void |
setAdjustForBinSize(boolean adjust)
Sets the flag that controls whether or not the bin count is divided by
the bin size in the
getYValue(int, int) method, and sends a
DatasetChangeEvent to all registered listeners. |
indexOf, seriesChangedaddChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitindexOfaddChangeListener, getGroup, removeChangeListener, setGrouppublic SimpleHistogramDataset(Comparable key)
adjustForBinSize flag defaults to true.key - the series key (null not permitted).public boolean getAdjustForBinSize()
getXValue(int, int) method.setAdjustForBinSize(boolean)public void setAdjustForBinSize(boolean adjust)
getYValue(int, int) method, and sends a
DatasetChangeEvent to all registered listeners.adjust - the flag.getAdjustForBinSize()public int getSeriesCount()
getSeriesCount in interface SeriesDatasetgetSeriesCount in class AbstractSeriesDatasetpublic Comparable getSeriesKey(int series)
series argument is ignored.getSeriesKey in interface SeriesDatasetgetSeriesKey in class AbstractSeriesDatasetseries - the series (zero-based index, ignored in this dataset).public DomainOrder getDomainOrder()
getDomainOrder in interface XYDatasetgetDomainOrder in class AbstractXYDatasetnull).public int getItemCount(int series)
series argument is ignored.getItemCount in interface XYDatasetseries - the series index (zero-based, ignored in this dataset).public void addBin(SimpleHistogramBin bin)
bin - the bin (null not permitted).removeAllBins()public void addObservation(double value)
value - the value.public void addObservation(double value,
boolean notify)
value - the value.notify - send DatasetChangeEvent to listeners?public void addObservations(double[] values)
DatasetChangeEvent to all registered listeners.values - the values (null not permitted).clearObservations()public void clearObservations()
DatasetChangeEvent to all registered listeners.addObservations(double[]),
removeAllBins()public void removeAllBins()
DatasetChangeEvent to all
registered listeners.addBin(SimpleHistogramBin)public Number getX(int series, int item)
public double getXValue(int series,
int item)
getXValue in interface XYDatasetgetXValue in class AbstractXYDatasetseries - the series index (zero-based).item - the item index (zero-based).public Number getY(int series, int item)
public double getYValue(int series,
int item)
getYValue in interface XYDatasetgetYValue in class AbstractXYDatasetseries - the series index (zero-based).item - the item index (zero-based).getAdjustForBinSize()public Number getStartX(int series, int item)
getStartX in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).public double getStartXValue(int series,
int item)
getStartXValue in interface IntervalXYDatasetgetStartXValue in class AbstractIntervalXYDatasetseries - the series (zero-based index).item - the item (zero-based index).IntervalXYDataset.getStartX(int, int)public Number getEndX(int series, int item)
getEndX in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).public double getEndXValue(int series,
int item)
getEndXValue in interface IntervalXYDatasetgetEndXValue in class AbstractIntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).IntervalXYDataset.getEndX(int, int)public Number getStartY(int series, int item)
getStartY in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).public double getStartYValue(int series,
int item)
getStartYValue in interface IntervalXYDatasetgetStartYValue in class AbstractIntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).IntervalXYDataset.getStartY(int, int)public Number getEndY(int series, int item)
getEndY in interface IntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).public double getEndYValue(int series,
int item)
getEndYValue in interface IntervalXYDatasetgetEndYValue in class AbstractIntervalXYDatasetseries - the series index (zero-based).item - the item index (zero-based).IntervalXYDataset.getEndY(int, int)public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone in interface PublicCloneableclone in class AbstractDatasetCloneNotSupportedException - not thrown by this class, but maybe
by subclasses (if any).Copyright © 2001–2017 JFree.org. All rights reserved.