|
24 | 24 |
|
25 | 25 | import java.util.Arrays;
|
26 | 26 | import java.util.HashMap;
|
27 |
| -import java.util.Map; |
28 | 27 |
|
29 | 28 | import org.slf4j.Logger;
|
30 | 29 | import org.slf4j.LoggerFactory;
|
@@ -52,23 +51,23 @@ public class App {
|
52 | 51 | public App() {
|
53 | 52 | LOGGER.info("Constructing parts and car");
|
54 | 53 |
|
55 |
| - Map<String, Object> carProperties = new HashMap<>(); |
| 54 | + var carProperties = new HashMap<String, Object>(); |
56 | 55 | carProperties.put(Property.MODEL.toString(), "300SL");
|
57 | 56 | carProperties.put(Property.PRICE.toString(), 10000L);
|
58 | 57 |
|
59 |
| - Map<String, Object> wheelProperties = new HashMap<>(); |
| 58 | + var wheelProperties = new HashMap<String, Object>(); |
60 | 59 | wheelProperties.put(Property.TYPE.toString(), "wheel");
|
61 | 60 | wheelProperties.put(Property.MODEL.toString(), "15C");
|
62 | 61 | wheelProperties.put(Property.PRICE.toString(), 100L);
|
63 | 62 |
|
64 |
| - Map<String, Object> doorProperties = new HashMap<>(); |
| 63 | + var doorProperties = new HashMap<String, Object>(); |
65 | 64 | doorProperties.put(Property.TYPE.toString(), "door");
|
66 | 65 | doorProperties.put(Property.MODEL.toString(), "Lambo");
|
67 | 66 | doorProperties.put(Property.PRICE.toString(), 300L);
|
68 | 67 |
|
69 | 68 | carProperties.put(Property.PARTS.toString(), Arrays.asList(wheelProperties, doorProperties));
|
70 | 69 |
|
71 |
| - Car car = new Car(carProperties); |
| 70 | + var car = new Car(carProperties); |
72 | 71 |
|
73 | 72 | LOGGER.info("Here is our car:");
|
74 | 73 | LOGGER.info("-> model: {}", car.getModel().get());
|
|
0 commit comments