I have a custom Map using where Device is an instance of my class named Device.
devices = new HashMap<String, Device>();
I tried several Iterators and for loops suggested at StackOverflow, but all of them seem to produce errors and I don’t know why.
Example errors:

and

Looks like the declaration of
devicesis incorrect. It should be:Not the raw (“erased”) type,
Map. Modern compilers should give you warnings for using raw types. Take note of compiler warnings.