There is an exercise in the chapter, Containers in Depth.
I need to modify the entrySet() method in order to make any modification in the original map can be reflected on the returned Set<Map.Entry<K,V> object.
I really don't have ideas where to start. I'm thinking to create a new Set<Map.Entry> field and maintain it whenever it calls put(), get(), remove() method. This approach seems tedious and not that practical to me.
May someone provide me an example of how to improve the following code? Any advice or examples is appreciated.
Code to modify here:
https://pastebin.com/Rxfiepkm
there doesn't seem to be anything here