boolean (Object o) { if (!(o instanceof LongEntry<?>)) return false; LongEntry<?> e = (LongEntry<?>)o; Object r = map.get(e.getKey()); if (r == null) return false; Object v = e.getValue(); return v == r || v.equals(r); }