boolean (final Object obj) { if (!(obj instanceof PsiElementUsageGroupBase group)) return false; if (isValid() && group.isValid()) { return getElement().getManager().areElementsEquivalent(getElement(), group.getElement()); } return Objects.equals(myName, ((PsiElementUsageGroupBase<?>)obj).myName); }