Skip to content
Advertisement

Updating value of particular keys in MultiKeyMap in Java

I was trying to update the values of set of particular keys in MultiKeyMap in Java but not able to get how to do that.

Suppose I want to update (key1, key2, value1) same set of key with different value (key1, key2, value2).

If I simply perform put in MultiKeyMap then it create new row and doesn’t update the value. replace() is also not working.

JavaScript

Getting error at replace function

not applicable for the arguments (String, String, String, List<Double>)

Please provide solution for updating value in MultiKeyMap.

maven dependency :

JavaScript

Advertisement

Answer

You can use put in order to replace (key1,key2,key3) with new value list. Your code run correct with this exemple

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement