Class ChangeStateTypeChangeBuilder

java.lang.Object
com.commercetools.history.models.change.ChangeStateTypeChangeBuilder
All Implemented Interfaces:
Builder<ChangeStateTypeChange>

public class ChangeStateTypeChangeBuilder extends Object implements Builder<ChangeStateTypeChange>
ChangeStateTypeChangeBuilder
Example to create an instance using the builder pattern

     ChangeStateTypeChange changeStateTypeChange = ChangeStateTypeChange.builder()
             .change("{change}")
             .previousValue(StateTypeEnum.ORDER_STATE)
             .nextValue(StateTypeEnum.ORDER_STATE)
             .build()
 
  • Constructor Details

    • ChangeStateTypeChangeBuilder

      public ChangeStateTypeChangeBuilder()
  • Method Details

    • change

      public ChangeStateTypeChangeBuilder change(String change)
      set the value to the change
      Parameters:
      change - value to be set
      Returns:
      Builder
    • previousValue

      public ChangeStateTypeChangeBuilder previousValue(StateTypeEnum previousValue)

      Value before the change.

      Parameters:
      previousValue - value to be set
      Returns:
      Builder
    • nextValue

      public ChangeStateTypeChangeBuilder nextValue(StateTypeEnum nextValue)

      Value after the change.

      Parameters:
      nextValue - value to be set
      Returns:
      Builder
    • getChange

      public String getChange()
      value of change}
      Returns:
      change
    • getPreviousValue

      public StateTypeEnum getPreviousValue()

      Value before the change.

      Returns:
      previousValue
    • getNextValue

      public StateTypeEnum getNextValue()

      Value after the change.

      Returns:
      nextValue
    • build

      public ChangeStateTypeChange build()
      builds ChangeStateTypeChange with checking for non-null required values
      Specified by:
      build in interface Builder<ChangeStateTypeChange>
      Returns:
      ChangeStateTypeChange
    • buildUnchecked

      public ChangeStateTypeChange buildUnchecked()
      builds ChangeStateTypeChange without checking for non-null required values
      Returns:
      ChangeStateTypeChange
    • of

      public static ChangeStateTypeChangeBuilder of()
      factory method for an instance of ChangeStateTypeChangeBuilder
      Returns:
      builder
    • of

      create builder for ChangeStateTypeChange instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder