src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java
/**
     * Removes all proto contacts that belong to the specified protocol group.
     *
     * @param protoGroup the group whose children we want removed.
     *
     * @return true if this <tt>MetaContact</tt> was modified and false
     * otherwise.
     */
Removes all proto contacts that belong to the specified protocol group.
@param protoGroup the group whose children we want removed.

@return true if this MetaContact was modified and false
otherwise.
Removes all proto contacts that belong to the specified protocol group . @param protoGroup the group whose children we want removed . @return true if this MetaContact was modified and false otherwise .
boolean removeContactsForGroup(ContactGroup protoGroup)
    {
        boolean modified = false;
        Iterator<Contact> contactsIter = protoContacts.iterator();
        while(contactsIter.hasNext())
        {
            Contact contact = contactsIter.next();
            if (contact.getParentContactGroup() == protoGroup)
            {
                contactsIter.remove();
                modified = true;
            }
        }
        if (modified && !protoContacts.contains(defaultContact))
        {
            defaultContact = null;
        }
        return modified;
    }
boolean removeContactsForGroup ( ContactGroup protoGroup ) { boolean modified = false ; Iterator < Contact > contactsIter = protoContacts . iterator ( ) ; while ( contactsIter . hasNext ( ) ) { Contact contact = contactsIter . next ( ) ; if ( contact . getParentContactGroup ( ) == protoGroup ) { contactsIter . remove ( ) ; modified = true ; } } if ( modified && ! protoContacts . contains ( defaultContact ) ) { defaultContact = null ; } return modified ; }
Removes all proto contacts that belong to the specified protocol group.
Removes all proto contacts that belong to the specified protocol group .
// if the default contact has been modified, set it to null