Package de.gsi.dataset.spi
Class AbstractErrorDataSet<D extends AbstractErrorDataSet<D>>
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<D>
-
- de.gsi.dataset.spi.AbstractErrorDataSet<D>
-
- Type Parameters:
D- java generics handling of DataSet for derived classes (needed for fluent design)
- All Implemented Interfaces:
DataSet,DataSetError,DataSetMetaData,EventSource,java.io.Serializable
- Direct Known Subclasses:
AbstractTestFunction,CircularDoubleErrorDataSet,DoubleErrorDataSet,FifoDoubleErrorDataSet,LimitedIndexedTreeDataSet
public abstract class AbstractErrorDataSet<D extends AbstractErrorDataSet<D>> extends AbstractDataSet<D> implements DataSetError
The abstract implementation of DataSet and DataSetError interface that provides implementation of some methods.
- It maintains the name of the DataSet
- It maintains a list of DataSetListener objects and provides methods that can be used to dispatch DataSetEvent events.
- It maintains ranges of X and Y values including error bars
- It gives a possibility to specify an undefined value.
- Author:
- rstein
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.gsi.dataset.DataSetError
DataSetError.ErrorType
-
-
Field Summary
-
Fields inherited from class de.gsi.dataset.spi.AbstractDataSet
axisListener, dimension
-
Fields inherited from interface de.gsi.dataset.DataSetMetaData
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractErrorDataSet(java.lang.String name, int dimension, DataSetError.ErrorType... errorTypes)Creates a new instance ofAbstractDataSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DfireInvalidated(UpdateEvent event)Notifies listeners that the data has been invalidated.DataSetError.ErrorTypegetErrorType(int dimIndex)return the DataSetError.ErrorType of the datasetprotected DgetThis()DataSetLock<D>lock()DrecomputeLimits(int dimIndex)Computes limits (ranges) of this DataSet including data point errors.DsetErrorType(int dimIndex, DataSetError.ErrorType errorType)sets the error type of the data set for the given dimension index-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, autoNotification, binarySearch, binarySearch, clearMetaInfo, copyAxisDescription, copyDataLabelsAndStyles, copyMetaData, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getValue, getValues, getWarningList, hashCode, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListener
-
Methods inherited from class de.gsi.dataset.spi.AbstractStylable
getStyle, setStyle
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
get, getAxisDescription, getAxisDescriptions, getDataCount, getDataLabel, getDimension, getIndex, getName, getStyle, getStyle, getValue, getValues, set, set, setStyle
-
Methods inherited from interface de.gsi.dataset.DataSetError
getErrorNegative, getErrorNegative, getErrorPositive, getErrorPositive, getErrorsNegative, getErrorsPositive
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Constructor Detail
-
AbstractErrorDataSet
protected AbstractErrorDataSet(java.lang.String name, int dimension, DataSetError.ErrorType... errorTypes)Creates a new instance ofAbstractDataSet.- Parameters:
name- of the DataSetdimension- dimension of data seterrorTypes- for possible enum options see DataSetError.ErrorType- Throws:
java.lang.IllegalArgumentException- ifnameisnull
-
-
Method Detail
-
fireInvalidated
public D fireInvalidated(UpdateEvent event)
Description copied from class:AbstractDataSetNotifies listeners that the data has been invalidated. If the data is added to the chart, it triggers repaint.- Overrides:
fireInvalidatedin classAbstractDataSet<D extends AbstractErrorDataSet<D>>- Parameters:
event- the change event- Returns:
- itself (fluent design)
-
getErrorType
public DataSetError.ErrorType getErrorType(int dimIndex)
return the DataSetError.ErrorType of the dataset- Specified by:
getErrorTypein interfaceDataSetError- Parameters:
dimIndex- the dimension for which to query the ErrorType- Returns:
- one of the error types specified in ErrorType
- See Also:
for details
-
getThis
protected D getThis()
- Overrides:
getThisin classAbstractDataSet<D extends AbstractErrorDataSet<D>>
-
lock
public DataSetLock<D> lock()
- Specified by:
lockin interfaceDataSet- Overrides:
lockin classAbstractDataSet<D extends AbstractErrorDataSet<D>>- Returns:
- Read-Write Lock to guard the DataSet
- See Also:
DataSetLock
-
recomputeLimits
public D recomputeLimits(int dimIndex)
Computes limits (ranges) of this DataSet including data point errors.- Specified by:
recomputeLimitsin interfaceDataSet- Overrides:
recomputeLimitsin classAbstractDataSet<D extends AbstractErrorDataSet<D>>- Parameters:
dimIndex- the dimension to recompute the range for (-1 for all dimensions)- Returns:
- itself for method chaining
-
setErrorType
public D setErrorType(int dimIndex, DataSetError.ErrorType errorType)
sets the error type of the data set for the given dimension index- Parameters:
dimIndex- the dimension for which to set the ErrorTypeerrorType- error type to be set- Returns:
- itself (fluent design)
- See Also:
for details
-
-