@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!super.equals(obj)) {
      return false;
    }

    if (getClass() != obj.getClass()) {
      return false;
    }

    PortSource other = (PortSource) obj;
    return Objects.equals(m_port, other.m_port) &&
      Objects.equals(m_uri, other.m_uri);
  }
@param port
         the port to check on the given URI.
ambari-server/src/main/java/org/apache/ambari/server/state/alert/PortSource.java