R
Roedy Green
Inside HashMap are little glue Entry objects that point to the key and
value.
What if you could implement an interface on your objects so that
HashMap could use them directly without separate key or Entry glue?.
e.g. getKey()
getPrev()
getNext()
setPrev()
setNext()
One drawback would be your objects could live on only one such
space-efficient HashMap.
value.
What if you could implement an interface on your objects so that
HashMap could use them directly without separate key or Entry glue?.
e.g. getKey()
getPrev()
getNext()
setPrev()
setNext()
One drawback would be your objects could live on only one such
space-efficient HashMap.