Class FieldContainerBuilder

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

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

     FieldContainer fieldContainer = FieldContainer.builder()
             .//(//Builder -> //Builder)
             .build()
 
  • Constructor Details

    • FieldContainerBuilder

      public FieldContainerBuilder()
  • Method Details

    • values

      public FieldContainerBuilder values(Map<String,CustomField> values)

      Mapping from the Custom Field name to the actual value.

      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      public FieldContainerBuilder addValue(String key, CustomField value)

      Mapping from the Custom Field name to the actual value.

      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • getValues

      public Map<String,CustomField> getValues()

      Mapping from the Custom Field name to the actual value.

      Returns:
      pattern properties
    • build

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

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

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

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