Module nl.crashdata.chartjs.data
Class SimpleChartJsEventHandlerBuilder
- java.lang.Object
-
- nl.crashdata.chartjs.data.simple.builder.SimpleChartJsEventHandlerBuilder
-
- All Implemented Interfaces:
SimpleChartJsBuilder<ChartJsEventHandler>
public class SimpleChartJsEventHandlerBuilder extends Object implements SimpleChartJsBuilder<ChartJsEventHandler>
-
-
Constructor Summary
Constructors Constructor Description SimpleChartJsEventHandlerBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChartJsEventHandlerbuild()Builds a validCsuch thatbuilder.build() != builder.build().booleanisValid()Returnstrueif the state of this builder, including all its delegate builders, is ready to build.SimpleChartJsEventHandlerBuilderwithBody(String body)SimpleChartJsEventHandlerBuilderwithDefaultExecute(boolean defaultExecute)SimpleChartJsEventHandlerBuilderwithDefaultHandlerBodySupplier(Supplier<String> defaultHandlerBodySupplier)SimpleChartJsEventHandlerBuilderwithParameters(String... params)
-
-
-
Method Detail
-
withParameters
public SimpleChartJsEventHandlerBuilder withParameters(String... params)
-
withBody
public SimpleChartJsEventHandlerBuilder withBody(String body)
-
withDefaultHandlerBodySupplier
public SimpleChartJsEventHandlerBuilder withDefaultHandlerBodySupplier(Supplier<String> defaultHandlerBodySupplier)
-
withDefaultExecute
public SimpleChartJsEventHandlerBuilder withDefaultExecute(boolean defaultExecute)
-
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<ChartJsEventHandler>
-
build
public ChartJsEventHandler build() throws IllegalStateException
Description copied from interface:SimpleChartJsBuilderBuilds a validCsuch thatbuilder.build() != builder.build().- Specified by:
buildin interfaceSimpleChartJsBuilder<ChartJsEventHandler>- Returns:
- a valid
Cif and only ifSimpleChartJsBuilder.isValid()returns true. - Throws:
IllegalStateException- if called whenSimpleChartJsBuilder.isValid()returns false
-
-