@@ -0,0 +1,1813 @@
+package com.stolets.rxdiffutil;%0A%0Aimport android.support.annotation.NonNull;%0Aimport android.support.v7.util.DiffUtil;%0A%0Aimport java.util.List;%0A%0Aimport static com.stolets.rxdiffutil.internal.Preconditions.checkNotNull;%0A%0A/**%0A * Default implementation of the methods required by %7B@link DiffUtil.Callback%7D.%0A * Feel free to create our own subclass overriding only the required method.%0A *%0A * @param %3CI%3E Type of the data id.%0A * @param %3CD%3E Comparable data type.%0A */%0A@SuppressWarnings(%7B%22WeakerAccess%22, %22unused%22%7D)%0Apublic class DefaultDiffCallback%3CI, D extends Identifiable%3CI%3E%3E extends DiffUtil.Callback %7B%0A    @NonNull%0A    private final List%3C? extends D%3E mOldData;%0A    @NonNull%0A    private final List%3C? extends D%3E mNewData;%0A%0A    /**%0A     * Constructs an instance of %7B@link DefaultDiffCallback%7D.%0A     *%0A     * @param oldData The current list with the data.%0A     * @param newData The updated list with the data which is compared with the oldData.%0A     */%0A    public DefaultDiffCallback(@NonNull final List%3C? extends D%3E oldData, @NonNull final List%3C? extends D%3E newData) %7B%0A        checkNotNull(oldData, %22oldData must not be null!%22);%0A        checkNotNull(newData, %22newData must not be null!%22);%0A%0A        this.mOldData = oldData;%0A        this.mNewData = newData;%0A    %7D%0A%0A    @Override%0A    public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) %7B%0A        return mNewData.get(newItemPosition).equals(mOldData.get(oldItemPosition));%0A    %7D%0A%0A    @Override%0A    public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) %7B%0A        return mNewData.get(newItemPosition).getId().equals(mOldData.get(oldItemPosition).getId());%0A    %7D%0A%0A    @Override%0A    public int getNewListSize() %7B%0A        return mNewData.size();%0A    %7D%0A%0A    @Override%0A    public int getOldListSize() %7B%0A        return mOldData.size();%0A    %7D%0A%7D%0A

Add DefaultDiffCallback