Interface DeliveryDraft
- All Superinterfaces:
Draft<DeliveryDraft>
DeliveryDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DeliveryDraft deliveryDraft = DeliveryDraft.builder()
.plusItems(itemsBuilder -> itemsBuilder)
.plusParcels(parcelsBuilder -> parcelsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeliveryDraftBuilder
builder()
builder factory method for DeliveryDraftstatic DeliveryDraftBuilder
builder
(DeliveryDraft template) create builder for DeliveryDraft instancestatic DeliveryDraft
deepCopy
(DeliveryDraft template) factory method to create a deep copy of DeliveryDraft@Valid Address
@NotNull @Valid List<DeliveryItem>
getItems()
@NotNull @Valid List<DeliveryParcelDraft>
static DeliveryDraft
of()
factory methodstatic DeliveryDraft
of
(DeliveryDraft template) factory method to create a shallow copy DeliveryDraftvoid
setAddress
(Address address) set addressvoid
setItems
(DeliveryItem... items) set itemsvoid
setItems
(List<DeliveryItem> items) set itemsvoid
setParcels
(DeliveryParcelDraft... parcels) set parcelsvoid
setParcels
(List<DeliveryParcelDraft> parcels) set parcelsstatic com.fasterxml.jackson.core.type.TypeReference<DeliveryDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDeliveryDraft
(Function<DeliveryDraft, T> helper) accessor map function
-
Method Details
-
getItems
- Returns:
- items
-
getAddress
- Returns:
- address
-
getParcels
- Returns:
- parcels
-
setItems
set items- Parameters:
items
- values to be set
-
setItems
set items- Parameters:
items
- values to be set
-
setAddress
set address- Parameters:
address
- value to be set
-
setParcels
set parcels- Parameters:
parcels
- values to be set
-
setParcels
set parcels- Parameters:
parcels
- values to be set
-
of
factory method- Returns:
- instance of DeliveryDraft
-
of
factory method to create a shallow copy DeliveryDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DeliveryDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DeliveryDraft- Returns:
- builder
-
builder
create builder for DeliveryDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDeliveryDraft
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
-