public boolean deregisterServiceProvider(Object provider){
  Object oprovider=map.get(provider.getClass());
  if (provider == oprovider) {
    map.remove(provider.getClass());
    poset.remove(provider);
    if (provider instanceof RegisterableService) {
      RegisterableService rs=(RegisterableService)provider;
      rs.onDeregistration(registry,category);
    }
    return true;
  }
  return false;
}

public boolean deregisterServiceProvider ( Object provider ) { Object oprovider = map . get ( provider . getClass ( ) ) ; if ( provider == oprovider ) { map . remove ( provider . getClass ( ) ) ; poset . remove ( provider ) ; if ( provider instanceof RegisterableService ) { RegisterableService rs = ( RegisterableService ) provider ; rs . onDeregistration ( registry , category ) ; } return true ; } return false ; }
if the provider was not previously registered , do nothing .
