Lecture Notes for Concurrent Programming

8 July 2003 - Immutable Class Instances


A perfect hash function is one that generates no collisions; that is, it obeys the predicate

hf(I1) = hf(I2) if and only if I1 and I2 are the same class instance.

Whenever one class instance equals() another, the hashCode() contract requires that they produce equal hash codes. Because the hash function is perfect, the two objects must be identical and the hash code is isomorphic to an instance reference.


This page last modified on 7 July 2003.