MCPcopy Create free account
hub / github.com/antlr/codebuff / equals

Method equals

output/java_guava/1.4.17/MediaType.java:1014–1026  ·  view source on GitHub ↗
(@Nullable Object obj)

Source from the content-addressed store, hash-verified

1012 }
1013
1014 @Override
1015 public boolean equals(@Nullable Object obj) {
1016 if (obj == this) {
1017 return true;
1018 } else if (obj instanceof MediaType) {
1019 MediaType that = (MediaType) obj;
1020 return this.type.equals(that.type) && this.subtype.equals(that.subtype)
1021 // compare parameters regardless of order
1022 && this.parametersAsMap().equals(that.parametersAsMap());
1023 } else {
1024 return false;
1025 }
1026 }
1027
1028 @Override
1029 public int hashCode() {

Callers

nothing calls this directly

Calls 2

parametersAsMapMethod · 0.95
equalsMethod · 0.65

Tested by

no test coverage detected