TaskInfo.Builder

  • TaskInfo.Builder is used to create instances of TaskInfo objects, providing methods to set necessary attributes.

  • It offers methods like setTaskId and setTaskDurationSeconds to configure the TaskInfo details.

  • The build() method finalizes the configuration and returns a new TaskInfo instance based on the provided data.

  • build() throws exceptions if mandatory fields like taskId are missing or if invalid data is provided.

public static abstract class TaskInfo.Builder extends Object

Builder class for TaskInfo

Public Constructor Summary

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
setTaskId(String taskId)
Sets the task ID of the TaskInfo.

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.