Returns a hash code value for the object. The general contract of
- Whenever it is invoked on the same object more than once, the
hashCodemethod must consistently return the same integer, provided no information used in
equalscomparisons on the object is modified.
- If two objects are equal according to the
equals()method, then calling the
hashCodemethod on each of the two objects must produce the same integer result.