Interface IsBuilder
-
- All Known Implementing Classes:
AbstractBaseBuilder
,AbstractBuilder
,ChartBackgroundColorOptionsBuilder
,ChartPointerOptionsBuilder
,ColorSchemesOptionsBuilder
,DataLabelsOptionsBuilder
,DatasetsItemsSelectorOptionsBuilder
,HtmlLegendOptionsBuilder
,LabelItemBuilder
,LabelsOptionsBuilder
,ToastOptionsBuilder
,UpdateConfigurationBuilder
public interface IsBuilder
Represents an options builder.
Needed to check the consistency of builder after build.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends IsBuilder>
TcheckAndGetIfValid(T builder)
Checks if the builder haven't been invoked yet to create the object.
If not, throw aIllegalArgumentException
, otherwise it returns the builder.static void
checkIfValid(IsBuilder builder)
Checks if the builder haven't been invoked yet to create the object.
If not, throw aIllegalArgumentException
.boolean
isBuilt()
Returnstrue
if new object has been already created by the builder.static boolean
isValid(IsBuilder builder)
Returnstrue
if the builder haven't been invoked yet to create the object.
-
-
-
Method Detail
-
isValid
static boolean isValid(IsBuilder builder)
Returnstrue
if the builder haven't been invoked yet to create the object.- Parameters:
builder
- builder instance to be checked- Returns:
true
if the builder haven't been invoked yet to create the object
-
checkIfValid
static void checkIfValid(IsBuilder builder)
Checks if the builder haven't been invoked yet to create the object.
If not, throw aIllegalArgumentException
.- Parameters:
builder
- builder instance to be checked
-
checkAndGetIfValid
static <T extends IsBuilder> T checkAndGetIfValid(T builder)
Checks if the builder haven't been invoked yet to create the object.
If not, throw aIllegalArgumentException
, otherwise it returns the builder.- Type Parameters:
T
- type of key- Parameters:
builder
- builder instance to be checked- Returns:
- the same key passed as argument
-
isBuilt
boolean isBuilt()
Returnstrue
if new object has been already created by the builder.- Returns:
true
if new object has been already created by the builder
-
-