Class SimpleChartJsLegendConfigBuilder
- java.lang.Object
-
- nl.crashdata.chartjs.data.simple.builder.SimpleChartJsLegendConfigBuilder
-
- All Implemented Interfaces:
SimpleChartJsBuilder<ChartJsLegendConfig>
public class SimpleChartJsLegendConfigBuilder extends Object implements SimpleChartJsBuilder<ChartJsLegendConfig>
-
-
Constructor Summary
Constructors Constructor Description SimpleChartJsLegendConfigBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChartJsLegendConfigbuild()Builds a validCsuch thatbuilder.build() != builder.build().booleanisValid()Returnstrueif the state of this builder, including all its delegate builders, is ready to build.SimpleChartJsLegendConfigBuilderwithDisplay(boolean display)SimpleChartJsLegendConfigBuilderwithFontSize(boolean reverse)SimpleChartJsLegendConfigBuilderwithPosition(boolean fullWidth)SimpleChartJsLegendConfigBuilderwithText(List<String> labels)
-
-
-
Method Detail
-
withDisplay
public SimpleChartJsLegendConfigBuilder withDisplay(boolean display)
-
withPosition
public SimpleChartJsLegendConfigBuilder withPosition(boolean fullWidth)
-
withFontSize
public SimpleChartJsLegendConfigBuilder withFontSize(boolean reverse)
-
withText
public SimpleChartJsLegendConfigBuilder withText(List<String> labels)
-
isValid
public boolean isValid()
Description copied from interface:SimpleChartJsBuilderReturnstrueif 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 thatSimpleChartJsBuilder.build()would return a viable SimpleChartJs configuration object.- Specified by:
isValidin interfaceSimpleChartJsBuilder<ChartJsLegendConfig>
-
build
public ChartJsLegendConfig build() throws IllegalStateException
Description copied from interface:SimpleChartJsBuilderBuilds a validCsuch thatbuilder.build() != builder.build().- Specified by:
buildin interfaceSimpleChartJsBuilder<ChartJsLegendConfig>- Returns:
- a valid
Cif and only ifSimpleChartJsBuilder.isValid()returns true. - Throws:
IllegalStateException- if called whenSimpleChartJsBuilder.isValid()returns false
-
-