When I try to declare a Dictionary as such:
private Dictionary map;
The compiler gives me the following error:
Java collections only allow references not primitives. You need to use the wrapper classes (in this case java.lang.Integer) to do what you are after:
private Dictionary map;
they you can do things like:
int foo = map.get("hello");
and
map.put("world", 42);
and Java uses autoboxing/unboxing to deal with the details of the conversion for you.
Here is a little description on it.