public class SimpleChartJsDatasetBuilder<K extends Serializable,V extends Serializable> extends Object implements SimpleChartJsBuilder<SimpleChartJsDataset<K,V>>
| Constructor and Description |
|---|
SimpleChartJsDatasetBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SimpleChartJsDatasetBuilder<K,V> |
addDataPoint(ChartJsDataPoint<K,V> dataPoint) |
SimpleChartJsDatasetBuilder<K,V> |
addDataPoint(K x,
V y) |
SimpleChartJsDataset<K,V> |
build()
Builds a valid
C such that builder.build() != builder.build(). |
boolean |
isValid()
Returns
true if the state of this builder, including all its delegate builders, is
ready to build. |
SimpleChartJsDatasetBuilder<K,V> |
withBackgroundColor(ChartJsRGBAColor backgroundColor) |
SimpleChartJsDatasetBuilder<K,V> |
withBorderColor(ChartJsRGBAColor borderColor) |
SimpleChartJsDatasetBuilder<K,V> |
withDataPoints(List<ChartJsDataPoint<K,V>> dataPoints) |
SimpleChartJsDatasetBuilder<K,V> |
withDataPoints(Map<K,V> dataPoints) |
SimpleChartJsDatasetBuilder<K,V> |
withFill(String fill) |
SimpleChartJsDatasetBuilder<K,V> |
withLabel(String label) |
public SimpleChartJsDatasetBuilder<K,V> withLabel(String label)
public SimpleChartJsDatasetBuilder<K,V> withBackgroundColor(ChartJsRGBAColor backgroundColor)
public SimpleChartJsDatasetBuilder<K,V> withBorderColor(ChartJsRGBAColor borderColor)
public SimpleChartJsDatasetBuilder<K,V> withFill(String fill)
public SimpleChartJsDatasetBuilder<K,V> withDataPoints(List<ChartJsDataPoint<K,V>> dataPoints)
public SimpleChartJsDatasetBuilder<K,V> addDataPoint(ChartJsDataPoint<K,V> dataPoint)
public SimpleChartJsDatasetBuilder<K,V> addDataPoint(K x, V y)
public boolean isValid()
SimpleChartJsBuildertrue if the state of this builder, including all its delegate builders, is
ready to build. "Ready to build" means that this builder, including all its delegate
builders, is in such a state that SimpleChartJsBuilder.build() would return a viable SimpleChartJs
configuration object.isValid in interface SimpleChartJsBuilder<SimpleChartJsDataset<K extends Serializable,V extends Serializable>>public SimpleChartJsDataset<K,V> build() throws IllegalStateException
SimpleChartJsBuilderC such that builder.build() != builder.build().build in interface SimpleChartJsBuilder<SimpleChartJsDataset<K extends Serializable,V extends Serializable>>C if and only if SimpleChartJsBuilder.isValid() returns true.IllegalStateException - if called when SimpleChartJsBuilder.isValid() returns falseCopyright © 2018. All rights reserved.