diff --git a/vehiclesplus-v3/api/examples.md b/vehiclesplus-v3/api/examples.md index d681cae..7d79ab4 100644 --- a/vehiclesplus-v3/api/examples.md +++ b/vehiclesplus-v3/api/examples.md @@ -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 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