AI-generated Key Takeaways
-
VehicleStop.Builderis used to create instances ofVehicleStopobjects, defining properties like location and associated tasks. -
Developers can set the list of
TaskInfoobjects, the state of theVehicleStop, and the navigation waypoint using the builder's methods. -
The
build()method creates a newVehicleStopinstance based on the configured properties, ensuring necessary values are set. -
If a
VehicleStopis built withoutTaskInfosor if any required values are missing, exceptions likeIllegalArgumentExceptionorNullPointerExceptionwill be thrown.
Builder class for VehicleStop.
Public Method Summary
| VehicleStop |
build()
Returns new VehicleStop instance with the state set by the Builder.
|
| abstract VehicleStop.Builder |
setTaskInfoList(List<TaskInfo>
taskInfoList)
Sets the list of
TaskInfo objects associated with this stop.
|
| abstract VehicleStop.Builder |
setVehicleStopState(int value)
Sets the state of the VehicleStop.
|
| abstract VehicleStop.Builder |
setWaypoint(Waypoint waypoint)
Sets the location that should be navigated to for the stop.
|
Inherited Method Summary
Public Methods
public VehicleStop build ()
Returns new VehicleStop instance with the state set by the Builder.
Throws
| NullPointerException | if any non-nullable values are not set. |
|---|---|
| IllegalArgumentException | if the VehicleStop is set without any TaskInfos. |
public abstract VehicleStop.Builder setTaskInfoList (List<TaskInfo> taskInfoList)
Sets the list of
TaskInfo objects associated with this stop.
public abstract VehicleStop.Builder setVehicleStopState (int value)
Sets the state of the VehicleStop.
public abstract VehicleStop.Builder setWaypoint (Waypoint waypoint)
Sets the location that should be navigated to for the stop.