I'm trying to make a recursive HashMap data structure as such:
public HashMap<Character, HashMap> root;
The HashMap
s inside of root are also of type <Character, HashMap>
. This throws raw type warnings because the HashMap inside is not parametrized. I can't think of a way to do away with these warnings, because any attempts to explicitly parametrize a HashMap
will not stop because of its recursive nature. Any suggestions?
Thanks!
Declare:
Define:
Generalized form:
Declare interface:
Declare implementations:
Define: