0

So I have a hashmap<x,y> myHashmap

x implements z.

I want to get an iterator for z.

Since x is a "child" of z, this shouldn't be hard, but I can't think of how to do it.

My attempt:

return (Iterator<z>) this.myHashmap.keySet().iterator();
User
  • 23,729
  • 38
  • 124
  • 207

0 Answers0