Page Summary
-
TaskInfo.Builderis used to create instances ofTaskInfoobjects, representing tasks with durations and IDs. -
It provides methods like
setTaskDurationSecondsandsetTaskIdto configure task properties. -
The
build()method creates a newTaskInfoinstance based on the builder's settings, throwing exceptions if required fields are missing or invalid. -
This builder helps ensure that
TaskInfoobjects are created with the necessary information, contributing to data integrity in the system.
Builder class for TaskInfo
Public Constructor Summary
|
Builder()
|
Public Method Summary
| TaskInfo |
build()
Returns a new VehicleStop instance with the state set by the Builder.
|
| abstract TaskInfo.Builder |
setTaskDurationSeconds(long taskDurationSeconds)
Sets the task duration of the TaskInfo.
|
| abstract TaskInfo.Builder |
Inherited Method Summary
Public Constructors
public Builder ()
Public Methods
public TaskInfo build ()
Returns a new VehicleStop instance with the state set by the Builder.
Throws
| NullPointerException | if any non-nullable values are not set. |
|---|---|
| IllegalArgumentException | if the TaskInfo is set without a task Id. |
public abstract TaskInfo.Builder setTaskDurationSeconds (long taskDurationSeconds)
Sets the task duration of the TaskInfo.
public abstract TaskInfo.Builder setTaskId (String taskId)
Sets the task ID of the TaskInfo.