Class StringFieldBuilder

java.lang.Object
com.commercetools.importapi.models.customfields.StringFieldBuilder
All Implemented Interfaces:
Builder<StringField>

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

     StringField stringField = StringField.builder()
             .value("{value}")
             .build()
 
  • Constructor Details

    • StringFieldBuilder

      public StringFieldBuilder()
  • Method Details

    • value

      public StringFieldBuilder value(String value)
      set the value to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getValue

      public String getValue()
      value of value}
      Returns:
      value
    • build

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

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

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

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