I would also make the map type safe if I was you so you wont need to do casts.



final Map<String, WordDetails> wordList = new HashMap<String, WordDetails>();
...