Interface DeliveryParcel
public interface DeliveryParcel
DeliveryParcel
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryParcel deliveryParcel = DeliveryParcel.builder()
.deliveryId("{deliveryId}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryParcelBuilder
builder()
builder factory method for DeliveryParcelstatic DeliveryParcelBuilder
builder
(DeliveryParcel template) create builder for DeliveryParcel instancestatic DeliveryParcel
deepCopy
(DeliveryParcel template) factory method to create a deep copy of DeliveryParcel@NotNull String
@Valid List<DeliveryItem>
getItems()
@Valid ParcelMeasurements
@Valid TrackingData
static DeliveryParcel
of()
factory methodstatic DeliveryParcel
of
(DeliveryParcel template) factory method to create a shallow copy DeliveryParcelvoid
setDeliveryId
(String deliveryId) set deliveryIdvoid
setItems
(DeliveryItem... items) set itemsvoid
setItems
(List<DeliveryItem> items) set itemsvoid
setMeasurements
(ParcelMeasurements measurements) set measurementsvoid
setTrackingData
(TrackingData trackingData) set trackingDatastatic com.fasterxml.jackson.core.type.TypeReference<DeliveryParcel>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDeliveryParcel
(Function<DeliveryParcel, T> helper) accessor map function
-
Method Details
-
getDeliveryId
- Returns:
- deliveryId
-
getMeasurements
- Returns:
- measurements
-
getTrackingData
- Returns:
- trackingData
-
getItems
- Returns:
- items
-
setDeliveryId
set deliveryId- Parameters:
deliveryId
- value to be set
-
setMeasurements
set measurements- Parameters:
measurements
- value to be set
-
setTrackingData
set trackingData- Parameters:
trackingData
- value to be set
-
setItems
set items- Parameters:
items
- values to be set
-
setItems
set items- Parameters:
items
- values to be set
-
of
factory method- Returns:
- instance of DeliveryParcel
-
of
factory method to create a shallow copy DeliveryParcel- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DeliveryParcel- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DeliveryParcel- Returns:
- builder
-
builder
create builder for DeliveryParcel instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDeliveryParcel
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-