Class SetPropertyChangeBuilder

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

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

     SetPropertyChange setPropertyChange = SetPropertyChange.builder()
             .change("{change}")
             .path("{path}")
             .build()
 
  • Constructor Details

    • SetPropertyChangeBuilder

      public SetPropertyChangeBuilder()
  • Method Details

    • change

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

      public SetPropertyChangeBuilder previousValue(Object previousValue)

      Value before the change.

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

      public SetPropertyChangeBuilder nextValue(Object nextValue)

      Value after the change.

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

      public SetPropertyChangeBuilder path(String path)

      Path to the property that was updated.

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

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

      public Object getPreviousValue()

      Value before the change.

      Returns:
      previousValue
    • getNextValue

      public Object getNextValue()

      Value after the change.

      Returns:
      nextValue
    • getPath

      public String getPath()

      Path to the property that was updated.

      Returns:
      path
    • build

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

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

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

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