Class SetProductCountChangeBuilder

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

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

     SetProductCountChange setProductCountChange = SetProductCountChange.builder()
             .change("{change}")
             .previousValue(1)
             .nextValue(1)
             .build()
 
  • Constructor Details

    • SetProductCountChangeBuilder

      public SetProductCountChangeBuilder()
  • Method Details

    • change

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

      public SetProductCountChangeBuilder previousValue(Integer previousValue)

      Value before the change.

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

      public SetProductCountChangeBuilder nextValue(Integer nextValue)

      Value after the change.

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

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

      public Integer getPreviousValue()

      Value before the change.

      Returns:
      previousValue
    • getNextValue

      public Integer getNextValue()

      Value after the change.

      Returns:
      nextValue
    • build

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

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

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

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