Class EnumValueBuilder

java.lang.Object
com.commercetools.importapi.models.common.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)
      set the value to the key
      Parameters:
      key - value to be set
      Returns:
      Builder
    • label

      public EnumValueBuilder label(String label)
      set the value to the label
      Parameters:
      label - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()
      value of key}
      Returns:
      key
    • getLabel

      public String getLabel()
      value of label}
      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