@Override
  public boolean equals(Object obj) {
    if (!(obj instanceof StackInfo)) {
      return false;
    }
    if (this == obj) {
      return true;
    }
    StackInfo stackInfo = (StackInfo) obj;
    return getName().equals(stackInfo.getName()) && getVersion().equals(stackInfo.getVersion());
  }
Set all types and associated attributes.  Any previously existing types and
attributes are removed prior to setting the new values.

@param types map of type attributes
ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java