So I have an ArrayList with objects that have name, id, salary etc. And a Queues with another ArrayList objects, model, year etc. I created a HashMap and used the ArrayList objects as keys and the queues as values, associating each queue for a object in the arraylist.
The thing is, I have to list all the values for a determined key. I would like to know how can I return all the values of a hashmap depending on the name value of the object.
For example this my map:
{Mech [Name = Ella McCarthy , ID = 1]=[Car [model=Civic, year=2010, fix=flat tyres], Car [model=Audi A3, year=2012, fix=something broken]],
Mech [Name = Josh Reys , ID = 1]=[Car [model=Cruze, year=2014, fix=something broken], Car [model=Impala, year=1990, fix=something broken]]}
Is there any way of returning the value if the name in the object in the key equals to Ella McCarthy?