Going through the Python tutorial again:
Tuples can be used as keys if they contain only strings, numbers, or tuples; if a tuple contains any mutable object either directly or indirectly, it cannot be used as a key.
Well OK, that sounds reasonable. You can’t use an object as a key if it keeps changing, right?
Oh wait, I can in Java. I define a Hash function, done.
I have only had to use this once, and it was for a rather baroque situation, but it was rather cool that I could do it, and fairly simple as well. Just pick which non-mutable instance variables of the class that should be used to generate a hash value, and shove them into a hash function.