/** * Recalculate the hash code after deserialization. The hash code of some * keys might have change (hash codes based on the system hash code are * only stable for the same process). * @return the instance with recalculated hash code */ protected Object readResolve() { calculateHashCode(keys); return this; } }