Interface DeliveryParcel


public interface DeliveryParcel
DeliveryParcel
Example to create an instance using the builder pattern

     DeliveryParcel deliveryParcel = DeliveryParcel.builder()
             .deliveryId("{deliveryId}")
             .build()
 
  • Method Details

    • getDeliveryId

      @NotNull @NotNull String getDeliveryId()
      Returns:
      deliveryId
    • getMeasurements

      @Valid @Valid ParcelMeasurements getMeasurements()
      Returns:
      measurements
    • getTrackingData

      @Valid @Valid TrackingData getTrackingData()
      Returns:
      trackingData
    • getItems

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

      void setDeliveryId(String deliveryId)
      set deliveryId
      Parameters:
      deliveryId - value to be set
    • setMeasurements

      void setMeasurements(ParcelMeasurements measurements)
      set measurements
      Parameters:
      measurements - value to be set
    • setTrackingData

      void setTrackingData(TrackingData trackingData)
      set trackingData
      Parameters:
      trackingData - value to be set
    • 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
    • of

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

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

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

      static DeliveryParcelBuilder builder()
      builder factory method for DeliveryParcel
      Returns:
      builder
    • builder

      static DeliveryParcelBuilder builder(DeliveryParcel template)
      create builder for DeliveryParcel instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDeliveryParcel

      default <T> T withDeliveryParcel(Function<DeliveryParcel,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<DeliveryParcel> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference