Package de.gsi.dataset.spi
Class WrappedDataSet
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<WrappedDataSet>
-
- de.gsi.dataset.spi.WrappedDataSet
-
- All Implemented Interfaces:
DataSet,DataSet2D,DataSetMetaData,EventSource,java.io.Serializable
public class WrappedDataSet extends AbstractDataSet<WrappedDataSet> implements DataSet2D
A data set implementation which wraps another data set.- Author:
- braeun
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface de.gsi.dataset.DataSetMetaData
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
-
-
Constructor Summary
Constructors Constructor Description WrappedDataSet(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleget(int dimIndex, int index)Gets the x value of the data point with the index ijava.util.List<AxisDescription>getAxisDescriptions()intgetDataCount()Get the number of data points in the data set.DataSet2DgetDataset()java.lang.StringgetName()Returns the name of the dataset.java.lang.StringgetStyle(int index)A string representation of the CSS style associated with this specificDataSetdata point.doublegetX(int i)Gets the x value of the data point with the index iintgetXIndex(double x)Gets the index of the data point closest to the given x coordinate.doublegetY(int i)Gets the y value of the data point with the index ivoidsetDataset(DataSet2D dataset)update/overwrite internal data set with content from other data set-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, autoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getThis, getWarningList, hashCode, lock, minNeigbourSearchX, recomputeLimits, 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
getAxisDescription, getDataLabel, getIndex, getStyle, getValues, lock, recomputeLimits, setStyle
-
Methods inherited from interface de.gsi.dataset.DataSet2D
getDataCount, getDimension, getValue, getValue, getXValues, getYIndex, getYValues
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Method Detail
-
get
public double get(int dimIndex, int index)Description copied from interface:DataSetGets the x value of the data point with the index i
-
getAxisDescriptions
public java.util.List<AxisDescription> getAxisDescriptions()
- Specified by:
getAxisDescriptionsin interfaceDataSet- Overrides:
getAxisDescriptionsin classAbstractDataSet<WrappedDataSet>- Returns:
- axis descriptions of the primary and secondary axes
-
getDataCount
public int getDataCount()
Description copied from interface:DataSet2DGet the number of data points in the data set.- Specified by:
getDataCountin interfaceDataSet- Specified by:
getDataCountin interfaceDataSet2D- Returns:
- the number of data points
-
getDataset
public DataSet2D getDataset()
- Returns:
- wrapped internal data set
-
getName
public java.lang.String getName()
Returns the name of the dataset. This will return the name of the wrapped dataset. If no dataset is wrapped, the name of this object is returned.- Specified by:
getNamein interfaceDataSet- Overrides:
getNamein classAbstractDataSet<WrappedDataSet>- Returns:
- name of the dataset
-
getStyle
public java.lang.String getStyle(int index)
Description copied from class:AbstractDataSetA string representation of the CSS style associated with this specificDataSetdata point. @see #getStyle()- Specified by:
getStylein interfaceDataSet- Overrides:
getStylein classAbstractDataSet<WrappedDataSet>- Parameters:
index- the index of the specific data point- Returns:
- user-specific data set style description (ie. may be set by user)
-
getX
public double getX(int i)
Description copied from interface:DataSet2DGets the x value of the data point with the index i
-
getXIndex
public int getXIndex(double x)
Description copied from interface:DataSet2DGets the index of the data point closest to the given x coordinate. The index returned may be less then zero or larger the the number of data points in the data set, if the x coordinate lies outside the range of the data set.
-
getY
public double getY(int i)
Description copied from interface:DataSet2DGets the y value of the data point with the index i
-
setDataset
public void setDataset(DataSet2D dataset)
update/overwrite internal data set with content from other data set- Parameters:
dataset- new data set
-
-