Returns a hash code for the attributes. Note that if a stored values are mutable, it is possible for two objects to be considered equal at one point in time and not equal at another (due to concurrent mutation of attribute values). @return a hash code for the attributes map.
()
| 203 | * @return a hash code for the attributes map. |
| 204 | */ |
| 205 | @Override |
| 206 | public int hashCode() { |
| 207 | int hashCode = 0; |
| 208 | for (Map.Entry<Key<?>, Object> e : data.entrySet()) { |
| 209 | hashCode += Objects.hashCode(e.getKey(), e.getValue()); |
| 210 | } |
| 211 | return hashCode; |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * The helper class to build an Attributes instance. |