package com.stolets.rxdiffutil;

import android.app.Activity;
import android.support.annotation.NonNull;
import android.support.v7.util.DiffUtil;

import com.stolets.rxdiffutil.diffrequest.DiffRequestBuilder;

import static com.stolets.rxdiffutil.internal.Preconditions.checkNotNull;

/**
 * Represents an entry point for making diff requests.
 */
@SuppressWarnings("WeakerAccess")
public final class RxDiffUtil {

    /**
     * Creates the diff request builder that is used to configure request parameters.
     *
     * @param activity     An {@link Activity} the lifecycle of the request is bound to.
     *                     Note: When the activity is finished the request is cancelled automatically.
     * @param diffCallback A concrete implementation of {@link DiffUtil.Callback}.
     * @return {@link DiffRequestBuilder}.
     */
    @NonNull
    public static DiffRequestBuilder builder(@NonNull final Activity activity, @NonNull final DiffUtil.Callback diffCallback) {
        checkNotNull(activity, "activity must not be null!");
        checkNotNull(diffCallback, "diffCallback must not be null!");

        return new DiffRequestBuilder(activity, diffCallback);
    }
}

@@ -30,37 +30,8 @@
 l;%0A%0A
-import android.app.Activity;%0A
 impo
@@ -484,200 +484,8 @@
   *%0A
-     * @param activity     An %7B@link Activity%7D the lifecycle of the request is bound to.%0A     *                     Note: When the activity is finished the request is cancelled automatically.%0A
     
@@ -668,50 +668,13 @@
 der 
-builder(@NonNull final Activity activity, 
+with(
 @Non
@@ -722,70 +722,8 @@
 ) %7B%0A
-        checkNotNull(activity, %22activity must not be null!%22);%0A
     
@@ -831,18 +831,8 @@
 der(
-activity, 
 diff

Refactor RxDiffUtil entry point method