Interface DeliveryDraft

All Superinterfaces:
Draft<DeliveryDraft>

public interface DeliveryDraft extends Draft<DeliveryDraft>
DeliveryDraft
Example to create an instance using the builder pattern

     DeliveryDraft deliveryDraft = DeliveryDraft.builder()
             .plusItems(itemsBuilder -> itemsBuilder)
             .plusParcels(parcelsBuilder -> parcelsBuilder)
             .build()
 
  • Method Details

    • getItems

      @NotNull @Valid @NotNull @Valid List<DeliveryItem> getItems()
      Returns:
      items
    • getAddress

      @Valid @Valid Address getAddress()
      Returns:
      address
    • getParcels

      @NotNull @Valid @NotNull @Valid List<DeliveryParcelDraft> getParcels()
      Returns:
      parcels
    • setItems

      void setItems(DeliveryItem... items)
      set items
      Parameters:
      items - values to be set
    • setItems

      void setItems(List<DeliveryItem> items)
      set items
      Parameters:
      items - values to be set
    • setAddress

      void setAddress(Address address)
      set address
      Parameters:
      address - value to be set
    • setParcels

      void setParcels(DeliveryParcelDraft... parcels)
      set parcels
      Parameters:
      parcels - values to be set
    • setParcels

      void setParcels(List<DeliveryParcelDraft> parcels)
      set parcels
      Parameters:
      parcels - values to be set
    • of

      static DeliveryDraft of()
      factory method
      Returns:
      instance of DeliveryDraft
    • of

      static DeliveryDraft of(DeliveryDraft template)
      factory method to create a shallow copy DeliveryDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static DeliveryDraft deepCopy(@Nullable DeliveryDraft template)
      factory method to create a deep copy of DeliveryDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static DeliveryDraftBuilder builder()
      builder factory method for DeliveryDraft
      Returns:
      builder
    • builder

      static DeliveryDraftBuilder builder(DeliveryDraft template)
      create builder for DeliveryDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDeliveryDraft

      default <T> T withDeliveryDraft(Function<DeliveryDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<DeliveryDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference