Package de.gsi.dataset
Interface DataSet
-
- All Superinterfaces:
EventSource,java.io.Serializable
- All Known Subinterfaces:
CategoryHistogram,DataSet2D,DataSet3D,DataSetError,EditableDataSet,GridDataSet,Histogram,Histogram1D,Histogram2D,TestDataSet<D>
- All Known Implementing Classes:
AbstractDataSet,AbstractErrorDataSet,AbstractGridDataSet,AbstractHistogram,AbstractStylable,AbstractTestFunction,AveragingDataSet,CircularDoubleErrorDataSet,CosineFunction,DefaultDataSet,DefaultErrorDataSet,DimReductionDataSet,DoubleDataSet,DoubleErrorDataSet,DoubleGridDataSet,FifoDoubleErrorDataSet,FloatDataSet,FragmentedDataSet,GaussFunction,Histogram,Histogram2,LabelledMarkerDataSet,LimitedIndexedTreeDataSet,MultiDimDoubleDataSet,OhlcvDataSet,RandomStepFunction,RandomWalkFunction,RollingDataSet,SincFunction,SineFunction,SingleOutlierFunction,TransposedDataSet,TransposedDataSet.TransposedGridDataSet,TriangleFunction,WrappedDataSet
public interface DataSet extends EventSource, java.io.Serializable
Basic interface for observable data sets.- Author:
- original from an unknown author at CERN (JDataViewer), braeun, rstein
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description doubleget(int dimIndex, int index)Gets the x value of the data point with the index idefault AxisDescriptiongetAxisDescription(int dim)Return the axis description of the i-th axis.java.util.List<AxisDescription>getAxisDescriptions()intgetDataCount()Get the number of data points in the data set.java.lang.StringgetDataLabel(int index)Returns label of a data point specified by the index.intgetDimension()intgetIndex(int dimIndex, double... x)Gets the index of the data point closest to the given 'value' coordinate.java.lang.StringgetName()Gets the name of the data set.java.lang.StringgetStyle()A string representation of the CSS style associated with this specificDataSet.java.lang.StringgetStyle(int index)A string representation of the CSS style associated with this specificDataSetdata point.doublegetValue(int dimIndex, double... x)Returns the value along the 'dimIndex' axis of a point specified by thexcoordinate.double[]getValues(int dimIndex)<D extends DataSet>
DataSetLock<D>lock()DataSetrecomputeLimits(int dimIndex)default DataSetset(DataSet other)DataSetset(DataSet other, boolean copy)DataSetsetStyle(java.lang.String style)A string representation of the CSS style associated with this specificDataSet.-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Field Detail
-
DIM_X
static final int DIM_X
- See Also:
- Constant Field Values
-
DIM_Y
static final int DIM_Y
- See Also:
- Constant Field Values
-
DIM_Z
static final int DIM_Z
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
double get(int dimIndex, int index)Gets the x value of the data point with the index i- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')index- data point index- Returns:
- the x value
-
getAxisDescription
default AxisDescription getAxisDescription(int dim)
Return the axis description of the i-th axis.- Parameters:
dim- 0: X-Axis, 1: Y-Axis, ...- Returns:
- Axis Label
-
getAxisDescriptions
java.util.List<AxisDescription> getAxisDescriptions()
- Returns:
- axis descriptions of the primary and secondary axes
-
getDataCount
int getDataCount()
Get the number of data points in the data set.- Returns:
- the number of data points
-
getDataLabel
java.lang.String getDataLabel(int index)
Returns label of a data point specified by the index. The label can be used as a category name if CategoryStepsDefinition is used or for annotations displayed for data points.- Parameters:
index- the data index- Returns:
- label of a data point specified by the index or
nullif none label has been specified for this data point.
-
getDimension
int getDimension()
- Returns:
- number of dimensions
-
getIndex
int getIndex(int dimIndex, double... x)Gets the index of the data point closest to the given 'value' 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.- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')x- the data point coordinates to search for- Returns:
- the index of the data point
-
getName
java.lang.String getName()
Gets the name of the data set.- Returns:
- the name of the DataSet
-
getStyle
java.lang.String getStyle()
A string representation of the CSS style associated with this specificDataSet. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Returns:
- user-specific data set style description (ie. may be set by user)
-
getStyle
java.lang.String getStyle(int index)
A string representation of the CSS style associated with this specificDataSetdata point. @see #getStyle()- Parameters:
index- the specific data point index- Returns:
- user-specific data set style description (ie. may be set by user)
-
getValues
double[] getValues(int dimIndex)
- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')- Returns:
- the x value array
-
lock
<D extends DataSet> DataSetLock<D> lock()
- Type Parameters:
D- generics (fluent design)- Returns:
- Read-Write Lock to guard the DataSet
- See Also:
DataSetLock
-
recomputeLimits
DataSet recomputeLimits(int dimIndex)
- Parameters:
dimIndex- the dimension to recompute the range for (-1 for all dimensions)- Returns:
- itself for method chaining
-
setStyle
DataSet setStyle(java.lang.String style)
A string representation of the CSS style associated with this specificDataSet. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Parameters:
style- the new user-specific style- Returns:
- itself (fluent interface)
-
getValue
double getValue(int dimIndex, double... x)Returns the value along the 'dimIndex' axis of a point specified by thexcoordinate.- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')x- horizontal 'dimIndex' coordinate- Returns:
- 'dimIndex' value
-
set
DataSet set(DataSet other, boolean copy)
- Parameters:
other- Other DataSet to copy into this DataSetcopy- true: perform a deep copy (default), false: reuse the other dataset's internal data structures (if applicable)- Returns:
- itself (fluent design) -- N.B. existing update listener are preserved
-
-