class JFCatDataset<X extends Comparable,S extends Comparable> extends org.jfree.data.general.AbstractDataset implements XyDataset<X,S>, org.jfree.data.category.CategoryDataset
This is open source software released under the Apache 2.0 License
| Modifier and Type | Field and Description |
|---|---|
private com.zavtech.morpheus.array.Array<Integer> |
colOrdinals |
private com.zavtech.morpheus.index.Index<X> |
domainKeys |
private Supplier<Class<X>> |
domainType |
private IntFunction<X> |
domainValueFunction |
private com.zavtech.morpheus.frame.DataFrame<?,S> |
frame |
private static Double |
NAN |
private Consumer<JFCatDataset<X,S>> |
refreshHandler |
private com.zavtech.morpheus.index.Index<S> |
seriesKeys |
| Modifier | Constructor and Description |
|---|---|
private |
JFCatDataset(Consumer<JFCatDataset<X,S>> refreshHandler)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(boolean notify)
Clears all data for this dataset
|
boolean |
contains(S seriesKey)
Returns true if this data contains the series specified
|
IntFunction<X> |
domainFunction()
Returns the domain function for this dataset
|
Class<X> |
domainType()
Returns the domain type for this dataset
|
<R> com.zavtech.morpheus.frame.DataFrame<R,S> |
frame()
Returns the current frame for this data, which can be null
|
int |
getColumnCount() |
int |
getColumnIndex(Comparable colKey) |
Comparable |
getColumnKey(int colIndex) |
List |
getColumnKeys() |
int |
getRowCount() |
int |
getRowIndex(Comparable rowKey) |
Comparable |
getRowKey(int rowIndex) |
List |
getRowKeys() |
Number |
getValue(Comparable rowKey,
Comparable colKey) |
Number |
getValue(int rowIndex,
int colIndex) |
boolean |
isEmpty()
Returns true if this dataset is empty
|
static <X extends Comparable,S extends Comparable> |
of(S domainAxisKey,
Supplier<com.zavtech.morpheus.frame.DataFrame<?,S>> frameSupplier)
Returns a newly created model using a frame supplier where the domain is presented by a column in the DataFrame
|
static <X extends Comparable,S extends Comparable> |
of(Supplier<com.zavtech.morpheus.frame.DataFrame<X,S>> frameSupplier)
Returns a newly created model using a frame supplier where the domain is presented by the DataFrame row keys
|
void |
refresh()
Triggers a refresh of this data based on the bound supplier
|
private void |
update(com.zavtech.morpheus.frame.DataFrame<?,S> frame,
com.zavtech.morpheus.array.Array<Integer> colOrdinals,
Supplier<Class<X>> domainType,
IntFunction<X> domainValueFunction)
Updates this model with the DataFrame, series column ordinals and domain value function
|
XyDataset<X,S> |
withLowerDomainInterval(Function<X,X> lowerIntervalFunction)
Sets the function to supply the lower domain interval value for this dataset
The lower domain interval function accepts a domain key and returns the interval to subtract
|
XyDataset<X,S> |
withUpperDomainInterval(Function<X,X> upperIntervalFunction)
Sets the function to supply the upper domain interval value for this dataset
The upper domain interval function accepts a domain key and returns the interval to subtract
|
addChangeListener, clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObjectprivate static final Double NAN
private com.zavtech.morpheus.index.Index<S extends Comparable> seriesKeys
private com.zavtech.morpheus.index.Index<X extends Comparable> domainKeys
private com.zavtech.morpheus.frame.DataFrame<?,S extends Comparable> frame
private com.zavtech.morpheus.array.Array<Integer> colOrdinals
private Supplier<Class<X extends Comparable>> domainType
private IntFunction<X extends Comparable> domainValueFunction
private Consumer<JFCatDataset<X extends Comparable,S extends Comparable>> refreshHandler
private JFCatDataset(Consumer<JFCatDataset<X,S>> refreshHandler)
refreshHandler - the refresh handlerpublic static <X extends Comparable,S extends Comparable> JFCatDataset<X,S> of(Supplier<com.zavtech.morpheus.frame.DataFrame<X,S>> frameSupplier)
X - the domain key typeS - the series key typeframeSupplier - the DataFrame supplier for this modelpublic static <X extends Comparable,S extends Comparable> JFCatDataset<X,S> of(S domainAxisKey, Supplier<com.zavtech.morpheus.frame.DataFrame<?,S>> frameSupplier)
X - the domain key typeS - the series key typedomainAxisKey - the DataFrame column key for the domainframeSupplier - the DataFrame supplier for this modelprivate void update(com.zavtech.morpheus.frame.DataFrame<?,S> frame, com.zavtech.morpheus.array.Array<Integer> colOrdinals, Supplier<Class<X>> domainType, IntFunction<X> domainValueFunction)
frame - the DataFrame to acceptcolOrdinals - the series column ordinalsdomainValueFunction - the domain value functionpublic void refresh()
XyDatasetrefresh in interface XyDataset<X extends Comparable,S extends Comparable>public boolean isEmpty()
XyDatasetisEmpty in interface XyDataset<X extends Comparable,S extends Comparable>public void clear(boolean notify)
XyDatasetclear in interface XyDataset<X extends Comparable,S extends Comparable>notify - if true, fire notification eventpublic Class<X> domainType()
XyDatasetdomainType in interface XyDataset<X extends Comparable,S extends Comparable>public <R> com.zavtech.morpheus.frame.DataFrame<R,S> frame()
XyDatasetframe in interface XyDataset<X extends Comparable,S extends Comparable>public boolean contains(S seriesKey)
XyDatasetcontains in interface XyDataset<X extends Comparable,S extends Comparable>seriesKey - the series keypublic IntFunction<X> domainFunction()
XyDatasetdomainFunction in interface XyDataset<X extends Comparable,S extends Comparable>public XyDataset<X,S> withLowerDomainInterval(Function<X,X> lowerIntervalFunction)
XyDatasetwithLowerDomainInterval in interface XyDataset<X extends Comparable,S extends Comparable>lowerIntervalFunction - the lower domain interval functionpublic XyDataset<X,S> withUpperDomainInterval(Function<X,X> upperIntervalFunction)
XyDatasetwithUpperDomainInterval in interface XyDataset<X extends Comparable,S extends Comparable>upperIntervalFunction - the upper domain interval functionpublic int getRowCount()
getRowCount in interface org.jfree.data.Values2Dpublic int getColumnCount()
getColumnCount in interface org.jfree.data.Values2Dpublic List getRowKeys()
getRowKeys in interface org.jfree.data.KeyedValues2Dpublic List getColumnKeys()
getColumnKeys in interface org.jfree.data.KeyedValues2Dpublic Comparable getRowKey(int rowIndex)
getRowKey in interface org.jfree.data.KeyedValues2Dpublic Comparable getColumnKey(int colIndex)
getColumnKey in interface org.jfree.data.KeyedValues2Dpublic int getRowIndex(Comparable rowKey)
getRowIndex in interface org.jfree.data.KeyedValues2Dpublic int getColumnIndex(Comparable colKey)
getColumnIndex in interface org.jfree.data.KeyedValues2Dpublic Number getValue(Comparable rowKey, Comparable colKey)
getValue in interface org.jfree.data.KeyedValues2Dpublic Number getValue(int rowIndex, int colIndex)
getValue in interface org.jfree.data.Values2DCopyright 2014-2017, Xavier Witdouck