code: public static boolean deregister( @Nonnull final Factory factory )
    {
      if ( g_factory != factory )
      {
        return false;
      }
      else
      {
        g_factory = null;
        return true;
      }
    }
docs: Deregister factory if the specified factory is the registered factory.
  
  @param factory the factory to deregister.
  @return true if able to deregister, false otherwise.