If your IDs are not unique, you still can use Map :
Map<Integer, String> map = new IdentityHashMap<Integer, String>();
map.put(new Integer(1), "string");
IdentityHashMap - use native hashCode implemetation for each OBJECT, so you don't need unique IDs, but you MUST create ALL Integers via operator 'new', and don't use autoboxing, because there is some cache mechanism.
Also there is JVM parameter, which controlls cache size '-XX:AutoBoxCacheMax='.
But using this parameter you can't disable cache, if you set size to the zero, then cache will ignore it and use default: [-128; 127].
This parameter is only for Integers, there is no such kind of parameter for Long.
UPDATE
Also for non unique keys you could use some sort of multimap:
Map> map
And store in it your values with nonunique keys:
map.put(1, new ArrayList<String>());
map.get(1).add("value1");
map.get(1).add("value2");
You can use HashMap for that for example.
Also you can find MultiMap implementation in google-collections: 'guava'.