Would the / hashmap hash table use a lot if it consists only of a link object and an int?
"a lot" depends on how many objects you have. For a few hundred or several thousand you will not notice.
But typically, the default Java collections are really incredibly inefficient when you work with primitives (due to constant boxing / unpacking from a "primitive to a shell", for example, "int to Integer"), both from views and memory points (the two are connected, but not identical).
If you have many records, such as hundreds of thousands or millions, I suggest using, for example, Trove collections.
In your case, you should use this:
TIntObjectHashMap<SomeJavaClass>
or that:
TObjectIntHashMap<SomeJavaClass>
In any case, it will surround default Java collections and cpu-wise by default (and this will cause a path smaller than GC, etc.).
(un) / int/Integer, , ..
Java HashMap<Integer,Integer> Trove TIntIntHashMap berzerk;)