Package org.dashbuilder.dataset
Interface DataSetBuilder
-
- All Known Implementing Classes:
DataSetBuilderImpl
public interface DataSetBuilderIt allows for the building of DataSet instances in a friendly manner.new DataSetBuilder() .column("month", ColumnType.LABEL) .column("2016", ColumnType.NUMBER) .column("2017", ColumnType.NUMBER) .column("2018", ColumnType.NUMBER) .row(JANUARY, 1000d, 2000d, 3000d) .row(FEBRUARY, 1400d, 2300d, 2000d) .row(MARCH, 1300d, 2000d, 1400d) .row(APRIL, 900d, 2100d, 1500d) .row(MAY, 1300d, 2300d, 1600d) .row(JUNE, 1010d, 2000d, 1500d) .row(JULY, 1050d, 2400d, 3000d) .row(AUGUST, 2300d, 2000d, 3200d) .row(SEPTEMBER, 1900d, 2700d, 3000d) .row(OCTOBER, 1200d, 2200d, 3100d) .row(NOVEMBER, 1400d, 2100d, 3100d) .row(DECEMBER, 1100d, 2100d, 4200d) .buildDataSet()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataSetbuildDataSet()Build and get the resulting DataSet instance.DataSetBuildercolumn(String columnId, ColumnType type)Add an empty column of the specified type.DataSetBuilderdate(String columnId)Add an empty column of type date.DataSetBuilderlabel(String columnId)Add an empty column of type label.DataSetBuildernumber(String columnId)Add an empty column of numeric type.DataSetBuilderrow(Object... values)Add a row with the given values at the end of the data set.DataSetBuildertext(String columnId)Add an empty column of type text.DataSetBuilderuuid(String uuid)Assigns an UUID to the data set
-
-
-
Method Detail
-
uuid
DataSetBuilder uuid(String uuid)
Assigns an UUID to the data set
-
label
DataSetBuilder label(String columnId)
Add an empty column of type label.
-
text
DataSetBuilder text(String columnId)
Add an empty column of type text.
-
number
DataSetBuilder number(String columnId)
Add an empty column of numeric type.
-
date
DataSetBuilder date(String columnId)
Add an empty column of type date.
-
column
DataSetBuilder column(String columnId, ColumnType type)
Add an empty column of the specified type.
-
row
DataSetBuilder row(Object... values)
Add a row with the given values at the end of the data set.
-
buildDataSet
DataSet buildDataSet()
Build and get the resulting DataSet instance.
-
-