docs: update vehiclesplus-v3/api/examples
This commit is contained in:
parent
3ee4b30621
commit
91551c7142
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
title: Examples
|
||||
description: Example usages of the api
|
||||
published: false
|
||||
date: 2024-12-28T22:26:48.261Z
|
||||
date: 2024-12-28T22:30:33.758Z
|
||||
tags: developers
|
||||
editor: markdown
|
||||
dateCreated: 2024-12-28T21:11:02.102Z
|
||||
|
@ -121,7 +121,7 @@ public void removeVehicleFromPoliceGarage(String vehicleModelName) {
|
|||
// Search for the vehicle with the given model name within the "police" garage
|
||||
Optional<Vehicle> vehicleToRemoveOptional = policeGarage.getVehicles().stream()
|
||||
// Convert the vehicle UUID to an actual StorageVehicle object
|
||||
.map(vehicleUuid -> VehiclesPlusAPI.getVehicle(vehicleUuid))
|
||||
.map(VehiclesPlusAPI::getVehicle)
|
||||
// Filter vehicles to match the given model name
|
||||
.filter(vehicle -> vehicle != null && vehicle.getVehicleModel().getId().equals(vehicleModelName))
|
||||
// Select the first match
|
||||
|
|
Reference in a new issue