I'm currently creating a simple taxi dispatch system for a java assignment.
the Taxi class contains the attribute platenumber.
I must have to create a hashmap that takes an area as a key and an ArrayList of taxi as the value. There are 6 different areas, and 50 unique Taxis(platenumber is what make them unique). each different area(key) is supposed to have a unique set of plates(or Taxis). and all areas are not to have more than 50 plates combined.
Now for my question,
Is there a way that I can access the object attribute (taxi plate number) within the the arraylist of taxi objects that is in the areas hashmap.
so,
areas.values()
will return my arraylist of Taxis
however I would like to get the plate number of the taxi objects that is in the taxi array list which is in the areas hashmap.
is this possible?