@@ -0,0 +1,1177 @@
+package com.stolets.rxdiffutil.diffrequest;%0A%0Aimport android.support.annotation.NonNull;%0A%0Aimport com.stolets.rxdiffutil.di.FragmentScope;%0A%0Aimport java.util.Collections;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport static com.stolets.rxdiffutil.internal.Preconditions.checkNotNull;%0A%0A/**%0A * Manages the diff requests lifecycle.%0A */%0A@FragmentScope%0Apublic final class DiffRequestManager %7B%0A    @NonNull%0A    private Map%3CString, DiffRequest%3E mPendingRequests = new HashMap%3C%3E();%0A%0A    /**%0A     * Adds a new %7B@link DiffRequest%7D to the pending list.%0A     * @param diffRequest A new %7B@link DiffRequest%7D.%0A     *                    Note: if a request with the same tag is already exists it will be replaced.%0A     */%0A    public void addPendingRequest(@NonNull final DiffRequest diffRequest) %7B%0A        checkNotNull(diffRequest, %22diffRequest must not be null!%22);%0A        mPendingRequests.put(diffRequest.getTag(), diffRequest);%0A    %7D%0A%0A    /**%0A     * @return A map holding all pending requests. Note: the returned map is unmodifiable.%0A     */%0A    @NonNull%0A    public Map%3CString, DiffRequest%3E getPendingRequests() %7B%0A        return Collections.unmodifiableMap(mPendingRequests);%0A    %7D%0A%7D%0A

Add DiffRequestManager