public int hashCode()
java.util.Hashtable
.
The general contract of hashCode
is:
hashCode
method on each of the two objects must
produce the same integer result.
equals(java.lang.Object)
method, then calling the hashCode method on each of the two objects
must produce distinct integer results. However, the programmer should be aware
that producing distinct integer results for unequal objects may improve the
performance of hashtables. As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)