Class AttributeSetTypeBuilder

java.lang.Object
com.commercetools.api.models.product_type.AttributeSetTypeBuilder
All Implemented Interfaces:
Builder<AttributeSetType>

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

     AttributeSetType attributeSetType = AttributeSetType.builder()
             .elementType(elementTypeBuilder -> elementTypeBuilder)
             .build()
 
  • Constructor Details

    • AttributeSetTypeBuilder

      public AttributeSetTypeBuilder()
  • Method Details

    • elementType

      public AttributeSetTypeBuilder elementType(AttributeType elementType)

      Attribute type of the elements in the set.

      Parameters:
      elementType - value to be set
      Returns:
      Builder
    • elementType

      Attribute type of the elements in the set.

      Parameters:
      builder - function to build the elementType value
      Returns:
      Builder
    • getElementType

      public AttributeType getElementType()

      Attribute type of the elements in the set.

      Returns:
      elementType
    • build

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

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

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

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