public class DataSetBuilder extends Object
Currently the builder generates the following DataSet types:
DefaultDataSet
DefaultErrorDataSet
FloatDataSet
MultiDimDoubleDataSet
UnsupportedOperationException
| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,AxisDescription> |
axisDescriptions |
protected Map<Integer,String> |
dataLabels |
protected Map<Integer,String> |
dataStyles |
protected List<String> |
errorList |
protected Map<Integer,double[]> |
errorsNeg |
protected Map<Integer,float[]> |
errorsNegFloat |
protected Map<Integer,double[]> |
errorsPos |
protected Map<Integer,float[]> |
errorsPosFloat |
protected List<String> |
infoList |
protected int[] |
initialCapacity |
protected Map<String,String> |
metaInfoMap |
protected String |
name |
protected Map<Integer,double[]> |
values |
protected Map<Integer,float[]> |
valuesFloat |
protected List<String> |
warningList |
| Constructor and Description |
|---|
DataSetBuilder()
default DataSet factory
|
DataSetBuilder(String dataSetName)
DataSet factory with data set name
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDataLabelStyleMap(DataSet dataSet) |
protected void |
addDataRanges(DataSet dataSet) |
protected void |
addMetaData(DataSet dataSet) |
DataSet |
build() |
<T extends DataSet> |
build(Class<T> clazz)
Tries to build a DataSet of the specified type
|
protected DataSet |
buildRawDataSet(String dsName,
int dim,
int[] size) |
DataSetBuilder |
setAxisMax(int dimension,
double value) |
DataSetBuilder |
setAxisMin(int dimension,
double value) |
DataSetBuilder |
setAxisName(int dimension,
String name) |
DataSetBuilder |
setAxisUnit(int dimension,
String unit) |
DataSetBuilder |
setDataLabelMap(Map<Integer,String> map) |
DataSetBuilder |
setDataStyleMap(Map<Integer,String> map) |
DataSetBuilder |
setDimension(int nDims) |
DataSetBuilder |
setEnableErrors(boolean enableErrors)
Determines wether an error DataSet should be returned.
|
DataSetBuilder |
setInitalCapacity(int... newInitialCapacity)
Sets the initial size of the dataset.
|
DataSetBuilder |
setMetaErrorList(String... errors) |
DataSetBuilder |
setMetaInfoList(String... infos) |
DataSetBuilder |
setMetaInfoMap(Map<String,String> map) |
DataSetBuilder |
setMetaWarningList(String... warning) |
DataSetBuilder |
setName(String name) |
DataSetBuilder |
setNegError(int dimIndex,
double[] errors) |
DataSetBuilder |
setNegError(int dimIndex,
float[] errors) |
DataSetBuilder |
setNegErrorNoCopy(int dimIndex,
double[] errors) |
DataSetBuilder |
setNegErrorNoCopy(int dimIndex,
float[] errors) |
DataSetBuilder |
setPosError(int dimIndex,
double[] errors) |
DataSetBuilder |
setPosError(int dimIndex,
float[] errors) |
DataSetBuilder |
setPosErrorNoCopy(int dimIndex,
double[] errors) |
DataSetBuilder |
setPosErrorNoCopy(int dimIndex,
float[] errors) |
DataSetBuilder |
setUseFloat(boolean useFloat) |
DataSetBuilder |
setValues(int dimIndex,
double[] values) |
DataSetBuilder |
setValues(int dimIndex,
double[][] values)
Convenience function to use data given as nested arrays.
|
DataSetBuilder |
setValues(int dimIndex,
float[] values) |
DataSetBuilder |
setValuesNoCopy(int dimIndex,
double[] values) |
DataSetBuilder |
setValuesNoCopy(int dimIndex,
float[] values) |
DataSetBuilder |
setXNegError(double[] errors)
Deprecated.
|
DataSetBuilder |
setXNegErrorNoCopy(double[] errors)
Deprecated.
|
DataSetBuilder |
setXPosError(double[] errors)
Deprecated.
Use
#setPosError(DataSet.DIM_X, values) instead |
DataSetBuilder |
setXPosErrorNoCopy(double[] errors)
Deprecated.
Use
#setPosErrorNoCopy(DataSet.DIM_X, values) instead |
DataSetBuilder |
setXValues(double[] values)
Deprecated.
Use
#setValues(DataSet.DIM_X, values) instead |
DataSetBuilder |
setXValuesNoCopy(double[] values)
Deprecated.
Use
#setValuesNoCopy(DataSet.DIM_X, values) instead |
DataSetBuilder |
setYNegError(double[] errors)
Deprecated.
|
DataSetBuilder |
setYNegErrorNoCopy(double[] errors)
Deprecated.
|
DataSetBuilder |
setYPosError(double[] errors)
Deprecated.
Use
#setPosError(DataSet.DIM_Y, values) instead |
DataSetBuilder |
setYPosErrorNoCopy(double[] errors)
Deprecated.
Use
#setPosErrorNoCopy(DataSet.DIM_Y, values) instead |
DataSetBuilder |
setYValues(double[] values)
Deprecated.
Use
#setValues(DataSet.DIM_Y, values) instead |
DataSetBuilder |
setYValuesNoCopy(double[] values)
Deprecated.
Use
#setValuesNoCopy(DataSet.DIM_Y, values) instead |
protected String name
protected int[] initialCapacity
protected Map<Integer,AxisDescription> axisDescriptions
public DataSetBuilder()
public DataSetBuilder(String dataSetName)
dataSetName - data set nameprotected void addDataLabelStyleMap(DataSet dataSet)
protected void addDataRanges(DataSet dataSet)
protected void addMetaData(DataSet dataSet)
public DataSet build()
public <T extends DataSet> T build(Class<T> clazz)
T - The DataSet return typeclazz - type of the return valuepublic DataSetBuilder setAxisMax(int dimension, double value)
public DataSetBuilder setAxisMin(int dimension, double value)
public DataSetBuilder setAxisName(int dimension, String name)
public DataSetBuilder setAxisUnit(int dimension, String unit)
public DataSetBuilder setDataLabelMap(Map<Integer,String> map)
public DataSetBuilder setDataStyleMap(Map<Integer,String> map)
public DataSetBuilder setMetaErrorList(String... errors)
public DataSetBuilder setMetaInfoList(String... infos)
public DataSetBuilder setMetaInfoMap(Map<String,String> map)
public DataSetBuilder setMetaWarningList(String... warning)
public final DataSetBuilder setName(String name)
public DataSetBuilder setNegError(int dimIndex, double[] errors)
public final DataSetBuilder setNegError(int dimIndex, float[] errors)
public DataSetBuilder setNegErrorNoCopy(int dimIndex, double[] errors)
public DataSetBuilder setNegErrorNoCopy(int dimIndex, float[] errors)
public final DataSetBuilder setPosError(int dimIndex, double[] errors)
dimIndex - The dimension index this error is used forerrors - double array with the errors (will only be copied if double DataSet is requested)public final DataSetBuilder setPosError(int dimIndex, float[] errors)
dimIndex - The dimension index this error is used forerrors - float array with the errors (will only be copied if double DataSet is requested)public final DataSetBuilder setPosErrorNoCopy(int dimIndex, double[] errors)
dimIndex - The dimension index this error is used forerrors - double array with the errors (will only be copied if double DataSet is requested)public final DataSetBuilder setPosErrorNoCopy(int dimIndex, float[] errors)
dimIndex - The dimension index this error is used forerrors - float array with the errors (will only be copied if double DataSet is requested)public final DataSetBuilder setValues(int dimIndex, double[] values)
dimIndex - the dim index the data is for.values - double array with data for the x dimension (will be copied)public final DataSetBuilder setValues(int dimIndex, float[] values)
dimIndex - the dim index the data is for.values - double array with data for the x dimension (will be copied)public final DataSetBuilder setValues(int dimIndex, double[][] values)
dimIndex - the dim index the data is for.values - double[][] array with data for the x dimensionpublic DataSetBuilder setValuesNoCopy(int dimIndex, double[] values)
dimIndex - the dim index the data is for.values - double array with data for the x dimensionpublic DataSetBuilder setValuesNoCopy(int dimIndex, float[] values)
dimIndex - the dim index the data is for.values - float array with data for the x dimensionpublic DataSetBuilder setDimension(int nDims)
nDims - the number of dimensions of the dataSet to buildpublic DataSetBuilder setEnableErrors(boolean enableErrors)
enableErrors - whether to build a data set with errorspublic DataSetBuilder setUseFloat(boolean useFloat)
useFloat - whether to return a float DataSetpublic DataSetBuilder setInitalCapacity(int... newInitialCapacity)
newInitialCapacity - varArgs sizes for the first n dimensions@Deprecated public DataSetBuilder setXValuesNoCopy(double[] values)
#setValuesNoCopy(DataSet.DIM_X, values) insteadvalues - double array with data for the x dimension@Deprecated public DataSetBuilder setYValuesNoCopy(double[] values)
#setValuesNoCopy(DataSet.DIM_Y, values) insteadvalues - double array with data for the y dimension@Deprecated public DataSetBuilder setXValues(double[] values)
#setValues(DataSet.DIM_X, values) insteadvalues - double array with data for the x dimension@Deprecated public DataSetBuilder setYValues(double[] values)
#setValues(DataSet.DIM_Y, values) insteadvalues - double array with data for the y dimension@Deprecated public DataSetBuilder setXPosErrorNoCopy(double[] errors)
#setPosErrorNoCopy(DataSet.DIM_X, values) insteaderrors - double array with data for the x dimension positive error@Deprecated public DataSetBuilder setYPosErrorNoCopy(double[] errors)
#setPosErrorNoCopy(DataSet.DIM_Y, values) insteaderrors - double array with data for the y dimension positive error@Deprecated public DataSetBuilder setXPosError(double[] errors)
#setPosError(DataSet.DIM_X, values) insteaderrors - double array with data for the x dimension positive error@Deprecated public DataSetBuilder setYPosError(double[] errors)
#setPosError(DataSet.DIM_Y, values) insteaderrors - double array with data for the y dimension positive error@Deprecated public DataSetBuilder setXNegErrorNoCopy(double[] errors)
@Deprecated public DataSetBuilder setYNegErrorNoCopy(double[] errors)
@Deprecated public DataSetBuilder setXNegError(double[] errors)
@Deprecated public DataSetBuilder setYNegError(double[] errors)
Copyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.