Class DateFieldBuilder

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

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

     DateField dateField = DateField.builder()
             .value(LocalDate.parse("2022-01-01"))
             .build()
 
  • Constructor Details

    • DateFieldBuilder

      public DateFieldBuilder()
  • Method Details

    • value

      public DateFieldBuilder value(LocalDate value)
      set the value to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getValue

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

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

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

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

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