MCPcopy Create free account
hub / github.com/grpc/grpc-java / hashCode

Method hashCode

api/src/main/java/io/grpc/Attributes.java:205–212  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.

Callers 1

valueEqualityMethod · 0.95

Calls 2

getKeyMethod · 0.45
getValueMethod · 0.45

Tested by 1

valueEqualityMethod · 0.76