src/net/java/sip/communicator/impl/contactlist/MetaContactImpl.java
/**
     * Remove capabilities for the given contacts.
     *
     * @param contact the <tt>Contact</tt>, which capabilities we remove
     * @param opSets the new updated set of operation sets
     */
Remove capabilities for the given contacts.
@param contact the Contact, which capabilities we remove
@param opSets the new updated set of operation sets
Remove capabilities for the given contacts . @param contact the Contact which capabilities we remove @param opSets the new updated set of operation sets
private void removeCapabilities(Contact contact,
                                    Map<String, ? extends OperationSet> opSets)
    {
        Set<String> contactNewCaps = opSets.keySet();
        synchronized(capabilities)
        {
            capabilities.entrySet()
                .stream()
                .filter(e -> !contactNewCaps.contains(e.getKey()))
                .forEach(e -> e.getValue().remove(contact));
            capabilities.entrySet().removeIf(e -> e.getValue().size() == 0);
        }
    }
private void removeCapabilities ( Contact contact , Map < String , ? extends OperationSet > opSets ) { Set < String > contactNewCaps = opSets . keySet ( ) ; synchronized ( capabilities ) { capabilities . entrySet ( ) . stream ( ) . filter ( e -> ! contactNewCaps . contains ( e . getKey ( ) ) ) . forEach ( e -> e . getValue ( ) . remove ( contact ) ) ; capabilities . entrySet ( ) . removeIf ( e -> e . getValue ( ) . size ( ) == 0 ) ; } }
Remove capabilities for the given contacts.
Remove capabilities for the given contacts .
// remove contact from opSet to contact mapping // remove opSets that have no associated contact