0
EDIT for lack of details, I have answered the question here. The question has been flagged and a moderator will delete it as soon as possible, thank you.
I have the following Ids and values respectively:
1 - 18;
1 - 19;
1 - 20;
3 - 21;
3 - 22;
8 - 23;
8 -24;
8 - 25;
11 - 26;
3 - 27;
3 - 28;
How can I make it so that when I pass the ID value via parameter, it returns the values of this ID? For example, if I passed ID 3, it would return me the values 21, 22, 27 & 28.
I should wear a map <integer, List<Integer>>
, correct? But how can I do that? As also I would add these values within my List?
Diego, how and where you are writing these values?
– Wakim
These values come from the local Sqlite database. The ID (first value) refers to a product, and the value (second value) of a calculation. So for example, ID 3 is a guitar that has 4 different calculations, with Ids 21, 22, 27 & 28
– Diego Fortes
then, when the user clicks on the product of ID 3, I have to check which are the calculations that are connected with it. here’s the problem. I think the map this way is the easiest way, but I could be wrong!
– Diego Fortes
Instead of loading all the data and putting it into one
map
you should fetch them from the bank only when the user chooses the ID, bringing the lines that have this ID.– ramaral