hash code and stump of map

This commit is contained in:
gnembon committed 2019-10-01 14:50:16 -03:00
1 parent b6fe264a76
commit 8b7b285503
12 files changed
+125 -5

No files matched your search

@@ -179,4 +179,13 @@ public class NumericValue extends Value
return "number";
}
@Override
public int hashCode()
{
if (Math.abs(Math.floor(value + 0.5D)-value) < epsilon) // is sufficiently close to the integer value
return Long.hashCode(getLong());
return Double.hashCode(value);
}
}