Equals based on hashcode is very dangerous. E.g. it is allowed that "peter" and "danny" give the same hashcode, but they are not equals.