Глядя на метод find HashMap, он написан следующим образом:
Код: Выделить всё
else if ((q = pr.find(h, k, kc)) != null)
return q;
else
p = pl;
Код: Выделить всё
static int tieBreakOrder(Object a, Object b) {
int d;
if (a == null || b == null ||
(d = a.getClass().getName().
compareTo(b.getClass().getName())) == 0)
d = (System.identityHashCode(a)
Подробнее здесь: [url]https://stackoverflow.com/questions/77952126/question-about-comparing-javas-hashmap-find-method-and-tiebreakorder[/url]