How to implement this method for my own classes used as key in a HashMap.
Thanks.