diff --git a/src/java/com/samskivert/util/HashIntMap.java b/src/java/com/samskivert/util/HashIntMap.java index 8614e590..73d7ba36 100644 --- a/src/java/com/samskivert/util/HashIntMap.java +++ b/src/java/com/samskivert/util/HashIntMap.java @@ -560,12 +560,19 @@ public class HashIntMap extends AbstractMap @Override public boolean equals (Object o) { - if (!(o instanceof IntEntry)) { + if (o instanceof IntEntry) { + IntEntry that = (IntEntry)o; + return (this.key == that.getIntKey()) && + ObjectUtil.equals(this.value, that.getValue()); + + } else if (o instanceof Entry) { + Entry that = (Entry)o; + return (this.getKey().equals(that.getKey())) && + ObjectUtil.equals(this.value, that.getValue()); + + } else { return false; } - IntEntry that = (IntEntry)o; - return (this.key == that.getIntKey()) && - ObjectUtil.equals(this.value, that.getValue()); } @Override public int hashCode ()