boolean (Object o) { if (!(o instanceof LongEntry<?>)) return false; LongEntry<?> e = (LongEntry<?>)o; if (e.getKey() != key) return false; Object v = e.getValue(); Object u = val; return v == u || v.equals(u); }