Java hashCode from one field

Edit: Prepare my objects for the use within a HashMap. after reading a bit about how to generate a hash code, im kind of confused now. My (probably trivial) question is, how should I implement a …