Class SetRatingChangeBuilder

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

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

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

    • SetRatingChangeBuilder

      public SetRatingChangeBuilder()
  • Method Details

    • change

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

      public SetRatingChangeBuilder previousValue(Integer previousValue)

      Value before the change.

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

      public SetRatingChangeBuilder 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 SetRatingChange build()
      builds SetRatingChange with checking for non-null required values
      Specified by:
      build in interface Builder<SetRatingChange>
      Returns:
      SetRatingChange
    • buildUnchecked

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

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

      public static SetRatingChangeBuilder of(SetRatingChange template)
      create builder for SetRatingChange instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder