Implemented equals() and hashCode() for Class class.