D - java generics handling of DataSet for derived classes (needed for fluent design)public abstract class AbstractDataSet<D extends AbstractStylable<D>> extends AbstractStylable<D> implements DataSet, DataSetMetaData
The abstract implementation of DataSet interface that provides implementation of some methods.
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
AbstractDataSet(String name,
int dimension)
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
addDataLabel(int index,
String label)
adds a custom new data label for a point The label can be used as a category name if CategoryStepsDefinition is
used or for annotations displayed for data points.
|
String |
addDataStyle(int index,
String style)
A string representation of the CSS style associated with this specific
DataSet data point. |
AtomicBoolean |
autoNotification()
Set the automatic notification of invalidation listeners.
|
protected int |
binarySearch(int dimIndex,
double search,
int indexMin,
int indexMax) |
D |
clearMetaInfo() |
protected boolean |
equalDataLabels(DataSet other)
checks for equal data labels, may be overwritten by derived classes
|
protected boolean |
equalEditConstraints(DataSet other)
checks for equal EditConstraints, may be overwritten by derived classes
|
protected boolean |
equalErrorValues(DataSet other,
double epsilon)
checks for equal 'get' error values, may be overwritten by derived classes
|
protected boolean |
equalMetaData(DataSet other)
checks for equal meta data, may be overwritten by derived classes
|
boolean |
equals(Object obj) |
boolean |
equals(Object obj,
double epsilon)
Indicates whether some other object is "equal to" this one.
|
protected boolean |
equalValues(DataSet other,
double epsilon)
checks for equal 'get' values with tolerance band, may be overwritten by derived classes
|
D |
fireInvalidated(UpdateEvent event)
Notifies listeners that the data has been invalidated.
|
List<AxisDescription> |
getAxisDescriptions() |
String |
getDataLabel(int index)
Returns label of a data point specified by the index.
|
StringHashMapList |
getDataLabelMap() |
StringHashMapList |
getDataStyleMap() |
int |
getDimension() |
EditConstraints |
getEditConstraints() |
List<String> |
getErrorList() |
int |
getIndex(int dimIndex,
double x)
Gets the index of the data point closest to the given x coordinate.
|
List<String> |
getInfoList() |
Map<String,String> |
getMetaInfo() |
String |
getName()
Gets the name of the data set.
|
String |
getStyle(int index)
A string representation of the CSS style associated with this specific
DataSet data point. |
protected D |
getThis() |
List<String> |
getWarningList() |
int |
hashCode() |
DataSetLock<? extends DataSet> |
lock() |
protected int |
minNeigbourSearchX(double search,
int indexMin,
int indexMax) |
D |
recomputeLimits(int dimIndex)
Computes limits (ranges) of this DataSet.
|
String |
removeDataLabel(int index)
remove a custom data label for a point The label can be used as a category name if CategoryStepsDefinition is
used or for annotations displayed for data points.
|
String |
removeStyle(int index)
A string representation of the CSS style associated with this specific
DataSet data point. |
D |
setEditConstraints(EditConstraints constraints) |
D |
setName(String name)
Sets the name of data set (meta data)
|
String |
toString() |
List<EventListener> |
updateEventListener() |
getStyle, setStyleclone, finalize, getClass, notify, notifyAll, wait, wait, waitget, getAxisDescription, getDataCount, getDataCount, getStyle, getValue, getValues, setStyleaddListener, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListenerpublic AbstractDataSet(String name, int dimension)
name - the default name of the data set (meta data)dimension - dimension of this data setpublic String addDataLabel(int index, String label)
index - of the data pointlabel - for the data point specified by the indexnull if no label has been specifiedpublic String addDataStyle(int index, String style)
DataSet data point. @see
#getStyle()index - the index of the specific data pointstyle - string for the data point specific CSS-stylingpublic AtomicBoolean autoNotification()
EventSourcetrue for automatic
notificationautoNotification in interface EventSourceprotected int binarySearch(int dimIndex,
double search,
int indexMin,
int indexMax)
public D clearMetaInfo()
protected boolean equalDataLabels(DataSet other)
other - classtrue if equalprotected boolean equalEditConstraints(DataSet other)
other - classtrue if equalprotected boolean equalErrorValues(DataSet other, double epsilon)
other - classepsilon - tolerance thresholdtrue if equalprotected boolean equalMetaData(DataSet other)
other - classtrue if equalpublic boolean equals(Object obj, double epsilon)
obj - the reference object with which to compare.epsilon - tolerance parameter (epsilon<=0 corresponds to numerically identical)true if this object is the same as the obj argument; false otherwise.protected boolean equalValues(DataSet other, double epsilon)
other - classepsilon - tolerance thresholdtrue if equalpublic D fireInvalidated(UpdateEvent event)
event - the change eventpublic List<AxisDescription> getAxisDescriptions()
getAxisDescriptions in interface DataSetpublic String getDataLabel(int index)
getDataLabel in interface DataSetindex - of the data labelnull if no label has been specifiedpublic StringHashMapList getDataLabelMap()
public StringHashMapList getDataStyleMap()
public final int getDimension()
getDimension in interface DataSetpublic EditConstraints getEditConstraints()
public List<String> getErrorList()
getErrorList in interface DataSetMetaDatapublic List<String> getInfoList()
getInfoList in interface DataSetMetaDatapublic Map<String,String> getMetaInfo()
getMetaInfo in interface DataSetMetaDatapublic String getName()
DataSetpublic String getStyle(int index)
DataSet data point. @see
#getStyle()protected D getThis()
getThis in class AbstractStylable<D extends AbstractStylable<D>>public List<String> getWarningList()
getWarningList in interface DataSetMetaDatapublic int getIndex(int dimIndex,
double x)
public DataSetLock<? extends DataSet> lock()
lock in interface DataSetDataSetLockprotected int minNeigbourSearchX(double search,
int indexMin,
int indexMax)
public D recomputeLimits(int dimIndex)
recomputeLimits in interface DataSetdimIndex - the chosen dimensionpublic String removeDataLabel(int index)
index - of the data pointnull if no label has been specifiedpublic String removeStyle(int index)
DataSet data point. @see
#getStyle()index - the index of the specific data pointpublic D setEditConstraints(EditConstraints constraints)
public D setName(String name)
name - the new namepublic List<EventListener> updateEventListener()
updateEventListener in interface EventSourceCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.