Class ParcelMeasurementsBuilder
java.lang.Object
com.commercetools.api.models.order.ParcelMeasurementsBuilder
- All Implemented Interfaces:
Builder<ParcelMeasurements>
ParcelMeasurementsBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ParcelMeasurements parcelMeasurements = ParcelMeasurements.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ParcelMeasurements with checking for non-null required valuesbuilds ParcelMeasurements without checking for non-null required valuesHeight of the Parcel.Length of the Parcel.Weight of the Parcel.Width of the Parcel.heightInMillimeter
(Integer heightInMillimeter) Height of the Parcel.lengthInMillimeter
(Integer lengthInMillimeter) Length of the Parcel.static ParcelMeasurementsBuilder
of()
factory method for an instance of ParcelMeasurementsBuilderstatic ParcelMeasurementsBuilder
of
(ParcelMeasurements template) create builder for ParcelMeasurements instanceweightInGram
(Integer weightInGram) Weight of the Parcel.widthInMillimeter
(Integer widthInMillimeter) Width of the Parcel.
-
Constructor Details
-
ParcelMeasurementsBuilder
public ParcelMeasurementsBuilder()
-
-
Method Details
-
heightInMillimeter
Height of the Parcel.
- Parameters:
heightInMillimeter
- value to be set- Returns:
- Builder
-
lengthInMillimeter
Length of the Parcel.
- Parameters:
lengthInMillimeter
- value to be set- Returns:
- Builder
-
widthInMillimeter
Width of the Parcel.
- Parameters:
widthInMillimeter
- value to be set- Returns:
- Builder
-
weightInGram
Weight of the Parcel.
- Parameters:
weightInGram
- value to be set- Returns:
- Builder
-
getHeightInMillimeter
Height of the Parcel.
- Returns:
- heightInMillimeter
-
getLengthInMillimeter
Length of the Parcel.
- Returns:
- lengthInMillimeter
-
getWidthInMillimeter
Width of the Parcel.
- Returns:
- widthInMillimeter
-
getWeightInGram
Weight of the Parcel.
- Returns:
- weightInGram
-
build
builds ParcelMeasurements with checking for non-null required values- Specified by:
build
in interfaceBuilder<ParcelMeasurements>
- Returns:
- ParcelMeasurements
-
buildUnchecked
builds ParcelMeasurements without checking for non-null required values- Returns:
- ParcelMeasurements
-
of
factory method for an instance of ParcelMeasurementsBuilder- Returns:
- builder
-
of
create builder for ParcelMeasurements instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-