CodePudding user response:
You have a good look at, the put method based on the hash key do find the location of the insert, and then insert the former and the position corresponding to the list of each data to compare whether to have the value, not on the tail is covered, insert (1.8 is in the tail)CodePudding user response:
Do you have a look at the parent classCodePudding user response:
KeySet and entrySet and values is the same, the realization of the three set does not explicitly to add value, they all inherited AbstractSet class, in fact they do not value, you look at their iterator methods in the implementation of the will know that simply means you use keySet iteration to get the value of the not keySet stored inside, but is gained from the map