Class ParcelMeasurementsBuilder

java.lang.Object
com.commercetools.api.models.order.ParcelMeasurementsBuilder
All Implemented Interfaces:
Builder<ParcelMeasurements>

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

     ParcelMeasurements parcelMeasurements = ParcelMeasurements.builder()
             .build()
 
  • Constructor Details

    • ParcelMeasurementsBuilder

      public ParcelMeasurementsBuilder()
  • Method Details

    • heightInMillimeter

      public ParcelMeasurementsBuilder heightInMillimeter(@Nullable Integer heightInMillimeter)

      Height of the Parcel.

      Parameters:
      heightInMillimeter - value to be set
      Returns:
      Builder
    • lengthInMillimeter

      public ParcelMeasurementsBuilder lengthInMillimeter(@Nullable Integer lengthInMillimeter)

      Length of the Parcel.

      Parameters:
      lengthInMillimeter - value to be set
      Returns:
      Builder
    • widthInMillimeter

      public ParcelMeasurementsBuilder widthInMillimeter(@Nullable Integer widthInMillimeter)

      Width of the Parcel.

      Parameters:
      widthInMillimeter - value to be set
      Returns:
      Builder
    • weightInGram

      public ParcelMeasurementsBuilder weightInGram(@Nullable Integer weightInGram)

      Weight of the Parcel.

      Parameters:
      weightInGram - value to be set
      Returns:
      Builder
    • getHeightInMillimeter

      @Nullable public Integer getHeightInMillimeter()

      Height of the Parcel.

      Returns:
      heightInMillimeter
    • getLengthInMillimeter

      @Nullable public Integer getLengthInMillimeter()

      Length of the Parcel.

      Returns:
      lengthInMillimeter
    • getWidthInMillimeter

      @Nullable public Integer getWidthInMillimeter()

      Width of the Parcel.

      Returns:
      widthInMillimeter
    • getWeightInGram

      @Nullable public Integer getWeightInGram()

      Weight of the Parcel.

      Returns:
      weightInGram
    • build

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

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

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

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