Skip to content

Commit

Permalink
Adding hashCode (open-telemetry#6195)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJazz committed Feb 14, 2024
1 parent 8e1eb65 commit 2b118d9
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,26 @@ public boolean equals(Object o) {
return false;
}

@Override
public int hashCode() {
int result = 1;
result *= 1000003;
result ^= this.getResource().hashCode();
result *= 1000003;
result ^= this.getInstrumentationScopeInfo().hashCode();
result *= 1000003;
result ^= this.getName().hashCode();
result *= 1000003;
result ^= this.getDescription().hashCode();
result *= 1000003;
result ^= this.getUnit().hashCode();
result *= 1000003;
result ^= this.getType().hashCode();
result *= 1000003;
result ^= this.getData().hashCode();
return result;
}

@Override
public String toString() {
return "DelegatingMetricData{" +
Expand Down

0 comments on commit 2b118d9

Please sign in to comment.