@SuppressWarnings("WeakerAccess")
    @MainThread
    public void removeObservers(@NonNull final LifecycleOwner owner) {
        assertMainThread("removeObservers");
        for (Map.Entry<Observer<T>, ObserverWrapper> entry : mObservers) {
            if (entry.getValue().isAttachedTo(owner)) {
                removeObserver(entry.getKey());
            }
        }
    }
@ SuppressWarnings ( "WeakerAccess" ) @ MainThread public void removeObservers ( @ NonNull final LifecycleOwner owner ) { assertMainThread ( "removeObservers" ) ; for ( Map . Entry < Observer < T > , ObserverWrapper > entry : mObservers ) { if ( entry . getValue ( ) . isAttachedTo ( owner ) ) { removeObserver ( entry . getKey ( ) ) ; } } }
Removes all observers that are tied to the given {@link LifecycleOwner}.

@param owner The {@code LifecycleOwner} scope for the observers to be removed.