FacetAndType: +equals/hashCode

GitOrigin-RevId: 01a19f51150f2edfc06e2c8e699de79fb1edd570
This commit is contained in:
Tagir Valeev
2020-05-05 07:41:51 +00:00
committed by intellij-monorepo-bot
parent 467ac38954
commit 33043c8160
@@ -133,5 +133,19 @@ public abstract class FacetModelBase implements FacetModel {
myFacet = facet;
myTypeId = id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FacetAndType type = (FacetAndType)o;
return Objects.equals(myFacet, type.myFacet) &&
Objects.equals(myTypeId, type.myTypeId);
}
@Override
public int hashCode() {
return Objects.hash(myFacet, myTypeId);
}
}
}