public class SimpleHistogramDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, Cloneable, org.jfree.util.PublicCloneable, Serializable
HistogramDataset
,
Serialized FormConstructor 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, seriesChanged
addChangeListener, getGroup, getNotify, hasListener, removeChangeListener, setGroup, setNotify, validateObject
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public 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 SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public Comparable getSeriesKey(int series)
series
argument is ignored.getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series (zero-based index, ignored in this dataset).public DomainOrder getDomainOrder()
getDomainOrder
in interface XYDataset
getDomainOrder
in class AbstractXYDataset
null
).public int getItemCount(int series)
series
argument is ignored.getItemCount
in interface XYDataset
series
- 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 XYDataset
getXValue
in class AbstractXYDataset
series
- 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 XYDataset
getYValue
in class AbstractXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getAdjustForBinSize()
public Number getStartX(int series, int item)
getStartX
in interface IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getStartXValue(int series, int item)
getStartXValue
in interface IntervalXYDataset
getStartXValue
in class AbstractIntervalXYDataset
series
- 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 IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getEndXValue(int series, int item)
getEndXValue
in interface IntervalXYDataset
getEndXValue
in class AbstractIntervalXYDataset
series
- 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 IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getStartYValue(int series, int item)
getStartYValue
in interface IntervalXYDataset
getStartYValue
in class AbstractIntervalXYDataset
series
- 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 IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getEndYValue(int series, int item)
getEndYValue
in interface IntervalXYDataset
getEndYValue
in class AbstractIntervalXYDataset
series
- 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 org.jfree.util.PublicCloneable
clone
in class AbstractDataset
CloneNotSupportedException
- not thrown by this class, but maybe
by subclasses (if any).Jas4pp 1.5 © Java Analysis Studio for Particle Physics