Package de.gsi.dataset.spi
Class FragmentedDataSet
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<FragmentedDataSet>
-
- de.gsi.dataset.spi.FragmentedDataSet
-
- All Implemented Interfaces:
DataSet,DataSet2D,DataSetMetaData,EventSource,java.io.Serializable
- Direct Known Subclasses:
RollingDataSet
public class FragmentedDataSet extends AbstractDataSet<FragmentedDataSet> implements DataSet2D
- Author:
- braeun
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intdataCountprotected java.util.ArrayList<DataSet>list-
Fields inherited from interface de.gsi.dataset.DataSetMetaData
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
-
-
Constructor Summary
Constructors Constructor Description FragmentedDataSet(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double[] xValues, double[] yValues)adds new custom x and y array values (internally generates a new DataSet)voidadd(DataSet set)voidclear()clears all sub-dataset referencesdoubleget(int dimIndex, int index)Gets the x value of the data point with the index iintgetDataCount(int dimIndex)Get the number of data points in the data set for a specific dimension.intgetDatasetCount()java.util.Collection<DataSet>getDatasets()java.lang.StringgetStyle(int i)A string representation of the CSS style associated with this specificDataSetdata point.intgetXIndex(double x)Gets the index of the data point closest to the given x coordinate.double[]getXValues()double[]getYValues()-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, autoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, 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, getAxisDescriptions, getDataCount, getDataLabel, getIndex, getName, getStyle, getValues, lock, recomputeLimits, setStyle
-
Methods inherited from interface de.gsi.dataset.DataSet2D
getDimension, getValue, getValue, getX, getY, getYIndex
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Field Detail
-
dataCount
protected int dataCount
-
list
protected final java.util.ArrayList<DataSet> list
-
-
Method Detail
-
add
public void add(DataSet set)
- Parameters:
set- new data set to be added to list
-
add
public void add(double[] xValues, double[] yValues)adds new custom x and y array values (internally generates a new DataSet)- Parameters:
xValues- new X coordinatesyValues- new Y coordinates
-
clear
public void clear()
clears all sub-dataset references
-
getDataCount
public int getDataCount(int dimIndex)
Description copied from interface:DataSetGet the number of data points in the data set for a specific dimension.- Specified by:
getDataCountin interfaceDataSet- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')- Returns:
- the number of data points
-
getDatasetCount
public int getDatasetCount()
- Returns:
- number of sub-datasets
-
getDatasets
public java.util.Collection<DataSet> getDatasets()
- Returns:
- sub-datasets
-
getStyle
public java.lang.String getStyle(int i)
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<FragmentedDataSet>- Parameters:
i- the index of the specific data point- Returns:
- user-specific data set style description (ie. may be set by user)
-
get
public double get(int dimIndex, int index)Description copied from interface:DataSetGets 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. If the x coordinate lies outside the range of the data set, the index of the first/last point is returned.
-
getXValues
public double[] getXValues()
- Specified by:
getXValuesin interfaceDataSet2D- Returns:
- the x value array
-
getYValues
public double[] getYValues()
- Specified by:
getYValuesin interfaceDataSet2D- Returns:
- the x value array
-
-