protected boolean removeFromAttributeValueMap ( final String key , final String value ) { final Collection < AbstractHtml5SharedObject > sharedObjects = getSharedObjects ( ) ; final Collection < WriteLock > writeLocks = lockAndGetWriteLocks ( ) ; boolean listenerInvoked = false ; try { final boolean removed = getAttributeValueMap ( ) . remove ( key , value ) ; if ( removed ) { setModified ( true ) ; invokeValueChangeListeners ( sharedObjects ) ; listenerInvoked = true ; } } finally { for ( final Lock lock : writeLocks ) { lock . unlock ( ) ; } } pushQueues ( sharedObjects , listenerInvoked ) ; return listenerInvoked ; }
removes only if the key and value matches in the map for any particular entry .