DeliveryTask

  • DeliveryTask is an abstract class that represents a single action within a delivery workflow, differentiating between shipment and break tasks.

  • A shipment can involve multiple DeliveryTask instances, such as pickup and dropoff, potentially handled by different vehicles.

  • DeliveryTask provides builder methods to create and modify instances, allowing you to define task properties and relationships.

  • This class inherits functionalities from the Task class, enabling access to details like task state, outcome, and planned waypoint.

  • You can use toBuilder to create a new Builder pre-populated with the current DeliveryTask data for modifications.

public abstract class DeliveryTask extends Task

DeliveryTask represents a single action to track. In general there is a distinction between shipment-related tasks and break tasks. A shipment can have multiple tasks associated with it; for example, one task for the pickup and one for the dropoff or transfer. Different tasks for a given shipment can be handled by different vehicles; for example, one vehicle handles the pickup and drives the shipment to the hub, while another drives the same shipment from the hub to the dropoff.

Nested Class Summary

class DeliveryTask.Builder Builder class for DeliveryTask. 

Public Constructor Summary

Public Method Summary

static DeliveryTask.Builder
builder(String taskName)
Returns new default Builder instance.
static DeliveryTask.Builder
builder(String providerId, String taskId)
Returns new default Builder instance.
abstract DeliveryTask.Builder
toBuilder()
Returns new Builder instance set with current DeliveryTask state.

Inherited Method Summary

Public Constructors

public DeliveryTask ()

Public Methods

public static DeliveryTask.Builder builder (String taskName)

Returns new default Builder instance.

public static DeliveryTask.Builder builder (String providerId, String taskId)

Returns new default Builder instance.

public abstract DeliveryTask.Builder toBuilder ()

Returns new Builder instance set with current DeliveryTask state.