public void removeIdentity(String name) {
    if ((name != null) && (identities != null)) {
      Iterator<KerberosIdentityDescriptor> iterator = identities.iterator();

      while (iterator.hasNext()) {
        KerberosIdentityDescriptor identity = iterator.next();
        if (name.equals(identity.getName())) {
          identity.setParent(null);
          iterator.remove();
        }
      }
    }
  }
Remove all KerberosIdentityDescriptors have have the specified name
<p/>
One or more KerberosIdentityDescriptors may be removed if multiple KerberosIdentityDescriptors
have the same name.

@param name a String declaring the name of the descriptors to remove
ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptorContainer.java