From 8b491802f4774fdf337e0a7043d119dbddea14a1 Mon Sep 17 00:00:00 2001 From: mherbaghinyan Date: Sun, 24 Mar 2019 11:05:18 +0400 Subject: [PATCH] Trove adjustValue --- .../src/main/java/com/baeldung/map/PrimitiveMaps.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java-collections-maps-2/src/main/java/com/baeldung/map/PrimitiveMaps.java b/java-collections-maps-2/src/main/java/com/baeldung/map/PrimitiveMaps.java index 10245ce6e0..d835950c68 100644 --- a/java-collections-maps-2/src/main/java/com/baeldung/map/PrimitiveMaps.java +++ b/java-collections-maps-2/src/main/java/com/baeldung/map/PrimitiveMaps.java @@ -59,8 +59,11 @@ public class PrimitiveMaps { TDoubleIntMap doubleIntMap = new TDoubleIntHashMap(doubles, ints); - doubleIntMap.put(1.2, 1); - doubleIntMap.put(4.5, 4); - doubleIntMap.put(0.3, 0); + doubleIntMap.put(1.2, 22); + doubleIntMap.put(4.5, 16); + + doubleIntMap.adjustValue(1.2, 1); + doubleIntMap.adjustValue(4.5, 4); + doubleIntMap.adjustValue(0.3, 7); } }