Class TransitionCustomLineItemStateChangeBuilder
java.lang.Object
com.commercetools.history.models.change.TransitionCustomLineItemStateChangeBuilder
- All Implemented Interfaces:
Builder<TransitionCustomLineItemStateChange>
public class TransitionCustomLineItemStateChangeBuilder
extends Object
implements Builder<TransitionCustomLineItemStateChange>
TransitionCustomLineItemStateChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TransitionCustomLineItemStateChange transitionCustomLineItemStateChange = TransitionCustomLineItemStateChange.builder()
.change("{change}")
.plusPreviousValue(previousValueBuilder -> previousValueBuilder)
.plusNextValue(nextValueBuilder -> nextValueBuilder)
.lineItemId("{lineItemId}")
.stateId("{stateId}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddNextValue
(Function<ItemStateBuilder, ItemState> builder) Value after the change.addPreviousValue
(Function<ItemStateBuilder, ItemState> builder) Value before the change.build()
builds TransitionCustomLineItemStateChange with checking for non-null required valuesbuilds TransitionCustomLineItemStateChange without checking for non-null required valuesset the value to the changevalue of change}id
of the updated CustomLineItem.Value after the change.Value before the change.id
of the State involved in the transition.lineItemId
(String lineItemId) id
of the updated CustomLineItem.Value after the change.Value after the change.of()
factory method for an instance of TransitionCustomLineItemStateChangeBuilderof
(TransitionCustomLineItemStateChange template) create builder for TransitionCustomLineItemStateChange instanceplusNextValue
(ItemState... nextValue) Value after the change.Value after the change.plusPreviousValue
(ItemState... previousValue) Value before the change.Value before the change.previousValue
(ItemState... previousValue) Value before the change.previousValue
(List<ItemState> previousValue) Value before the change.setNextValue
(Function<ItemStateBuilder, ItemState> builder) Value after the change.setPreviousValue
(Function<ItemStateBuilder, ItemState> builder) Value before the change.id
of the State involved in the transition.Value after the change.Value before the change.
-
Constructor Details
-
TransitionCustomLineItemStateChangeBuilder
public TransitionCustomLineItemStateChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
plusPreviousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
plusPreviousValue
public TransitionCustomLineItemStateChangeBuilder plusPreviousValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public TransitionCustomLineItemStateChangeBuilder withPreviousValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
addPreviousValue
public TransitionCustomLineItemStateChangeBuilder addPreviousValue(Function<ItemStateBuilder, ItemState> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
setPreviousValue
public TransitionCustomLineItemStateChangeBuilder setPreviousValue(Function<ItemStateBuilder, ItemState> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
plusNextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
plusNextValue
public TransitionCustomLineItemStateChangeBuilder plusNextValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public TransitionCustomLineItemStateChangeBuilder withNextValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
addNextValue
public TransitionCustomLineItemStateChangeBuilder addNextValue(Function<ItemStateBuilder, ItemState> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
setNextValue
public TransitionCustomLineItemStateChangeBuilder setNextValue(Function<ItemStateBuilder, ItemState> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
lineItemId
id
of the updated CustomLineItem.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
stateId
id
of the State involved in the transition.- Parameters:
stateId
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
getLineItemId
id
of the updated CustomLineItem.- Returns:
- lineItemId
-
getStateId
id
of the State involved in the transition.- Returns:
- stateId
-
build
builds TransitionCustomLineItemStateChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<TransitionCustomLineItemStateChange>
- Returns:
- TransitionCustomLineItemStateChange
-
buildUnchecked
builds TransitionCustomLineItemStateChange without checking for non-null required values- Returns:
- TransitionCustomLineItemStateChange
-
of
factory method for an instance of TransitionCustomLineItemStateChangeBuilder- Returns:
- builder
-
of
public static TransitionCustomLineItemStateChangeBuilder of(TransitionCustomLineItemStateChange template) create builder for TransitionCustomLineItemStateChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-