public class DefaultWindDataset extends AbstractXYDataset implements WindDataset, org.jfree.util.PublicCloneable
WindDataset
interface.Constructor and Description |
---|
DefaultWindDataset()
Constructs a new, empty, dataset.
|
DefaultWindDataset(java.util.List seriesKeys,
java.lang.Object[][][] data)
Constructs a dataset based on the specified data array.
|
DefaultWindDataset(java.lang.Object[][][] data)
Constructs a dataset based on the specified data array.
|
DefaultWindDataset(java.lang.String[] seriesNames,
java.lang.Object[][][] data)
Constructs a dataset based on the specified data array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks this
WindDataset for equality with an arbitrary
object. |
int |
getItemCount(int series)
Returns the number of items in a series.
|
int |
getSeriesCount()
Returns the number of series in the dataset.
|
java.lang.Comparable |
getSeriesKey(int series)
Returns the key for a series.
|
java.lang.Number |
getWindDirection(int series,
int item)
Returns the wind direction for one item within a series.
|
java.lang.Number |
getWindForce(int series,
int item)
Returns the wind force for one item within a series.
|
java.lang.Number |
getX(int series,
int item)
Returns the x-value for one item within a series.
|
java.lang.Number |
getY(int series,
int item)
Returns the y-value for one item within a series.
|
static java.util.List |
seriesNameListFromDataArray(java.lang.Object[][] data)
Utility method for automatically generating series names.
|
getDomainOrder, getXValue, getYValue
indexOf, seriesChanged
addChangeListener, clone, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObject
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainOrder, getXValue, getYValue
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public DefaultWindDataset()
public DefaultWindDataset(java.lang.Object[][][] data)
data
- the data (null
not permitted).java.lang.NullPointerException
- if data
is null
.public DefaultWindDataset(java.lang.String[] seriesNames, java.lang.Object[][][] data)
seriesNames
- the names of the series (null
not
permitted).data
- the wind data.java.lang.NullPointerException
- if seriesNames
is
null
.public DefaultWindDataset(java.util.List seriesKeys, java.lang.Object[][][] data)
data[series][item][0]
- the date (either a
Date
or a Number
that is the milliseconds
since 1-Jan-1970);data[series][item][1]
- the wind direction (1 - 12,
like the numbers on a clock face);data[series][item][2]
- the wind force (1 - 12 on the
Beaufort scale)seriesKeys
- the names of the series (null
not
permitted).data
- the wind dataset (null
not permitted).java.lang.IllegalArgumentException
- if seriesKeys
is
null
.java.lang.IllegalArgumentException
- if the number of series keys does not
match the number of series in the array.java.lang.NullPointerException
- if data
is null
.public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series (zero-based index).public java.lang.Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series (zero-based index).public java.lang.Number getX(int series, int item)
public java.lang.Number getY(int series, int item)
getWindForce(int, int)
method and is implemented because
WindDataset
is an extension of XYDataset
.public java.lang.Number getWindDirection(int series, int item)
getWindDirection
in interface WindDataset
series
- the series (zero-based index).item
- the item (zero-based index).public java.lang.Number getWindForce(int series, int item)
getWindForce
in interface WindDataset
series
- the series (zero-based index).item
- the item (zero-based index).public static java.util.List seriesNameListFromDataArray(java.lang.Object[][] data)
data
- the wind data (null
not permitted).java.lang.NullPointerException
- if data
is null
.public boolean equals(java.lang.Object obj)
WindDataset
for equality with an arbitrary
object. This method returns true
if and only if:
obj
is not null
;obj
is an instance of
DefaultWindDataset
;equals
in class java.lang.Object
obj
- the object (null
permitted).