Class NumberSetAttributeBuilder

java.lang.Object
com.commercetools.importapi.models.productvariants.NumberSetAttributeBuilder
All Implemented Interfaces:
Builder<NumberSetAttribute>

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

     NumberSetAttribute numberSetAttribute = NumberSetAttribute.builder()
             .plusValue(valueBuilder -> valueBuilder)
             .build()
 
  • Constructor Details

    • NumberSetAttributeBuilder

      public NumberSetAttributeBuilder()
  • Method Details

    • name

      The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.

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

      public NumberSetAttributeBuilder value(Double... value)
      set values to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • value

      public NumberSetAttributeBuilder value(List<Double> value)
      set value to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • plusValue

      public NumberSetAttributeBuilder plusValue(Double... value)
      add values to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getName

      @Nullable public String getName()

      The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.

      Returns:
      name
    • getValue

      public List<Double> getValue()
      value of value}
      Returns:
      value
    • build

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

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

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

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