public int hashCode(){
  return name.hashCode();
}

public int hashCode ( ) { return name . hashCode ( ) ; }
this is basically the hash code for the field name . because field names are unique within a class collisions using just the name for the hash code should be infrequent .
