Mmmmm, but if I read articles on object equality, most examples use business values in the equals and hashcode values. Lets say for example
Code:
public class Point {
private int x, y;
public boolean equals(Object other) {
if (other == this) return true;
if (other == null) return false;
if (getClass() != other.getClass()) return false;
Point point = (Point)other;
return (x == point.x && y == point.y);
}
}
And I have code which moves this Point (assuming there is a moveTo method in the Point) this will also change the base upon which the code determines the equality. This is used in a lot of code. So I do not see the problem in changing the id from a neg number to a pos number affecting the equals method. I probable miss something crucial, please let me know.
(I read the javaworld article:
http://www.javaworld.com/javaworld/jw-06-2004/jw-0614-equals.html in which the above structure is recomended.