Class UpdateBuilder
java.lang.Object
com.commercetools.api.models.common.UpdateBuilder
UpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Update update = Update.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(UpdateAction... actions) set values to the actionsactions
(List<UpdateAction> actions) set value to the actionsaddActions
(Function<UpdateActionBuilder, UpdateAction> builder) add the value to the actions using the builder functionbuild()
builds Update with checking for non-null required valuesbuilds Update without checking for non-null required valuesvalue of actions}value of version}static UpdateBuilder
of()
factory method for an instance of UpdateBuilderstatic UpdateBuilder
create builder for Update instanceplusActions
(UpdateAction... actions) add values to the actionsadd the value to the actions using the builder functionsetActions
(Function<UpdateActionBuilder, UpdateAction> builder) set the value to the actions using the builder functionset the value to the versionset the value to the actions using the builder function
-
Constructor Details
-
UpdateBuilder
public UpdateBuilder()
-
-
Method Details
-
version
set the value to the version- Parameters:
version
- value to be set- Returns:
- Builder
-
actions
set values to the actions- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
set value to the actions- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
add values to the actions- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
add the value to the actions using the builder function- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
set the value to the actions using the builder function- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
addActions
add the value to the actions using the builder function- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
setActions
set the value to the actions using the builder function- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
value of version}- Returns:
- version
-
getActions
value of actions}- Returns:
- actions
-
build
builds Update with checking for non-null required values -
buildUnchecked
builds Update without checking for non-null required values- Returns:
- Update
-
of
factory method for an instance of UpdateBuilder- Returns:
- builder
-
of
create builder for Update instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-