Class NumberFieldBuilder

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

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

     NumberField numberField = NumberField.builder()
             .value(0.3)
             .build()
 
  • Constructor Details

    • NumberFieldBuilder

      public NumberFieldBuilder()
  • Method Details

    • value

      public NumberFieldBuilder value(Double value)
      set the value to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getValue

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

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

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

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

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