I am trying to build a HashMap which will have integer as keys and objects as values.
My syntax is:
HashMap myMap = new HashMap&
You may try to use Trove http://trove.starlight-systems.com/ TIntObjectHashMap is probably what you are looking for.