public final boolean unregisterFactory(Factory factory) {
        if (factory == null) {
            throw new NullPointerException();
        }

        boolean result = false;
        try {
            factoryLock.acquireWrite();
            if (factories.remove(factory)) {
                result = true;
                clearCaches();
            }
        }
        finally {
            factoryLock.releaseWrite();
        }

        if (result) {
            notifyChanged();
        }
        return result;
    }
public final boolean unregisterFactory ( Factory factory ) { if ( factory == null ) { throw new NullPointerException ( ) ; } boolean result = false ; try { factoryLock . acquireWrite ( ) ; if ( factories . remove ( factory ) ) { result = true ; clearCaches ( ) ; } } finally { factoryLock . releaseWrite ( ) ; } if ( result ) { notifyChanged ( ) ; } return result ; }
Unregister a factory.  The first matching registered factory will
be removed from the list.  Returns true if a matching factory was
removed.