I have two HashMap
in my code
HashMap<Long, Double> partesTrabajoIdHorasDb = new HashMap<>();//ID+horas
HashMap<Long, Double> partesTrabajoIdHorasLocal = new HashMap<>();
The first Hashmap
partsTrabajoIdHorasDb
saves two values key = id
and valor = horas_totales_trabajo_remoto
In the second HashMap
partsTrabajoIdHorasLocal
has the same format
key = id
and valor = horas_totales_trabajo_local
What I have to do is look for the coincidences of id between the two HashMap and once found to add both values ie in pseudocodigo:
if (TrabajoIdHorasDb.id == partesTrabajoIdHorasLocal.id)
horas totales = horas_totales_trabajo_remoto + horas_totales_trabajo_local
Can someone tell me what to do to find the id
common between both HashMap
and add the values for those ids?