Class EnumValueBuilder

java.lang.Object
com.commercetools.history.models.change_value.EnumValueBuilder
All Implemented Interfaces:
Builder<EnumValue>

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

     EnumValue enumValue = EnumValue.builder()
             .key("{key}")
             .label("{label}")
             .build()
 
  • Constructor Details

    • EnumValueBuilder

      public EnumValueBuilder()
  • Method Details

    • key

      public EnumValueBuilder key(String key)

      Key of the value used as a programmatic identifier.

      Parameters:
      key - value to be set
      Returns:
      Builder
    • label

      public EnumValueBuilder label(String label)

      Descriptive label of the value.

      Parameters:
      label - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()

      Key of the value used as a programmatic identifier.

      Returns:
      key
    • getLabel

      public String getLabel()

      Descriptive label of the value.

      Returns:
      label
    • build

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

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

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

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