Class DeliveryItemBuilder
java.lang.Object
com.commercetools.importapi.models.orders.DeliveryItemBuilder
- All Implemented Interfaces:
Builder<DeliveryItem>
DeliveryItemBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryItem deliveryItem = DeliveryItem.builder()
.id("{id}")
.quantity(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DeliveryItem with checking for non-null required valuesbuilds DeliveryItem without checking for non-null required valuesgetId()
value of id}value of quantity}set the value to the idstatic DeliveryItemBuilder
of()
factory method for an instance of DeliveryItemBuilderstatic DeliveryItemBuilder
of
(DeliveryItem template) create builder for DeliveryItem instanceset the value to the quantity
-
Constructor Details
-
DeliveryItemBuilder
public DeliveryItemBuilder()
-
-
Method Details
-
id
set the value to the id- Parameters:
id
- value to be set- Returns:
- Builder
-
quantity
set the value to the quantity- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getId
value of id}- Returns:
- id
-
getQuantity
value of quantity}- Returns:
- quantity
-
build
builds DeliveryItem with checking for non-null required values- Specified by:
build
in interfaceBuilder<DeliveryItem>
- Returns:
- DeliveryItem
-
buildUnchecked
builds DeliveryItem without checking for non-null required values- Returns:
- DeliveryItem
-
of
factory method for an instance of DeliveryItemBuilder- Returns:
- builder
-
of
create builder for DeliveryItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-