Interface TrackingData


public interface TrackingData

Information that helps track a Parcel.


Example to create an instance using the builder pattern

     TrackingData trackingData = TrackingData.builder()
             .build()
 
  • Method Details

    • getTrackingId

      String getTrackingId()

      Identifier to track the Parcel.

      Returns:
      trackingId
    • getCarrier

      String getCarrier()

      Name of the carrier that delivers the Parcel.

      Returns:
      carrier
    • getProvider

      String getProvider()

      Name of the provider that serves as facade to several carriers.

      Returns:
      provider
    • getProviderTransaction

      String getProviderTransaction()

      Transaction identifier with the provider.

      Returns:
      providerTransaction
    • getIsReturn

      Boolean getIsReturn()
      • If true, the Parcel is being returned.
      • If false, the Parcel is being delivered to the customer.
      Returns:
      isReturn
    • setTrackingId

      void setTrackingId(String trackingId)

      Identifier to track the Parcel.

      Parameters:
      trackingId - value to be set
    • setCarrier

      void setCarrier(String carrier)

      Name of the carrier that delivers the Parcel.

      Parameters:
      carrier - value to be set
    • setProvider

      void setProvider(String provider)

      Name of the provider that serves as facade to several carriers.

      Parameters:
      provider - value to be set
    • setProviderTransaction

      void setProviderTransaction(String providerTransaction)

      Transaction identifier with the provider.

      Parameters:
      providerTransaction - value to be set
    • setIsReturn

      void setIsReturn(Boolean isReturn)
      • If true, the Parcel is being returned.
      • If false, the Parcel is being delivered to the customer.
      Parameters:
      isReturn - value to be set
    • of

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

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

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

      static TrackingDataBuilder builder()
      builder factory method for TrackingData
      Returns:
      builder
    • builder

      static TrackingDataBuilder builder(TrackingData template)
      create builder for TrackingData instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTrackingData

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