In the implementation details of HashMap, I can read:
When using comparators on insertion, to keep a
* total ordering (or as close as is requir
No, you are moving entries to left or right indeed based on System::identityHashCode but in that bucket there are entries still that have the same hashCode (well not the same, only the portion that matters).
So when you search for something it sometimes has to look at both left and right, there is no way around it, as simple as that.