@Override
  public boolean equals(Object other) {
    if (other == this) {
      return true;
    }
    if (other == null) {
      return false;
    }
    if (!(other instanceof MembershipAttributes)) {
      return false;
    }
    final MembershipAttributes that = (MembershipAttributes) other;

    if (requiredRoles != that.requiredRoles
        && !(requiredRoles != null && requiredRoles.equals(that.requiredRoles))) {
      return false;
    }
    if (lossAction != that.lossAction
        && !(lossAction != null && lossAction.equals(that.lossAction))) {
      return false;
    }
    return resumptionAction == that.resumptionAction
        || resumptionAction != null
            && resumptionAction.equals(that.resumptionAction);
  }
Indicates whether some other object is "equal to" this one.

@param other the reference object with which to compare.
@return true if this object is the same as the obj argument; false otherwise.
geode-core/src/main/java/org/apache/geode/cache/MembershipAttributes.java