class LazyInitializationMain {
    public static void main(String[] args) {
        System.out.println("Wzorzec Inicjalizacja leniwa: leniwe tworzenie pojazdów");

        var vehicleProvider = new VehicleProvider();
        var truck1 = vehicleProvider.getVehicleByType("ciężarówka");
        vehicleProvider.printStatus();
        truck1.move();
        var car1 = vehicleProvider.getVehicleByType("auto");
        var car2 = vehicleProvider.getVehicleByType("auto");
        vehicleProvider.printStatus();
        car1.move();
        car2.move();
        System.out.println("ca1==car2: " + (car1.equals(car2)));
    }    
}
