I have two multimaps with Ids and names, one is filled with information that i get from a remote service and the second has information that i have in my local database. I need to compare and synchronize them.
Multimap<Long, String> remote
Multimap<Long, String> localDB
We can assume that ids are always the same but names can vary, e.g:
remote = {1 = [Tom], 2 = [Bob , Ron], 3 = [Philip]}
local = {1 = [Tom], 2 = [Johan, Robert], 3 = [Susan]}
And what i expect to get is:
local = {1 = [Tom], 2 = [Bob , Ron], 3 = [Philip]}
how can i get it?