public class Data
extends java.lang.Object
A data set fit for display by a specific data view plugin.
Data sets contain zero or more Series
,
and also zero or more additional columns of shared data:
data that applies not to any single series but to all series simultaneously.
For example, consider a bar chart displaying average monthly rainfall:
there might be series for 1970, 1971, and 1972
each with twelve entries (bars),
but there also needs to be a single additional column of labels for the months.
Both the series and the shared data must ascribe to the relevant DataViewSpecification
.
Constructor and Description |
---|
Data(java.util.List<Series> series,
java.util.Map<ColumnSpecification,Column> sharedData)
Create a data set with the provided series and shared data.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Series> |
series()
Get the list of series in this data set.
|
java.util.Map<ColumnSpecification,Column> |
sharedData()
Get the data shared among all columns in this data set.
|
public Data(java.util.List<Series> series, java.util.Map<ColumnSpecification,Column> sharedData)
DataViewSpecification
.series
- the list of series to include in the data set to be createdsharedData
- the shared data for the data set to be createdjava.lang.NullPointerException
- if series == null
,
sharedData == null
,
series
contains any null
elements,
or sharedData
contains any null
keys or valuespublic java.util.List<Series> series()
null
(but possibly empty) unmodifiable list,
each entry of which will ascribe to the relevant DataViewSpecification
.public java.util.Map<ColumnSpecification,Column> sharedData()
DataViewSpecification
.