@@ -0,0 +1,2176 @@
+/*%0A * Copyright 2015, Yahoo Inc.%0A * Copyrights licensed under the Apache 2.0 License.%0A * See the accompanying LICENSE file for terms.%0A */%0Apackage com.yahoo.squidb.recyclerview;%0A%0Aimport android.support.v7.widget.RecyclerView;%0A%0Aimport com.yahoo.squidb.data.AbstractModel;%0Aimport com.yahoo.squidb.data.SquidCursor;%0A%0A/**%0A * RecyclerView.Adapter implementation backed by a %7B@link SquidCursor%7D%0A *%0A * @param %3CM%3E the model type of the backing SquidCursor%0A * @param %3CV%3E a RecyclerView.ViewHolder implementation%0A */%0Apublic abstract class SquidRecyclerAdapter%3CM extends AbstractModel, V extends RecyclerView.ViewHolder%3E%0A        extends RecyclerView.Adapter%3CV%3E %7B%0A%0A    private SquidCursor%3CM%3E cursor;%0A%0A    /**%0A     * Construct a new SquidRecyclerAdapter%0A     */%0A    public SquidRecyclerAdapter() %7B%0A        this(null);%0A    %7D%0A%0A    /**%0A     * Construct a new SquidRecyclerAdapter backed by the specified SquidCursor%0A     */%0A    public SquidRecyclerAdapter(SquidCursor%3CM%3E cursor) %7B%0A        this.cursor = cursor;%0A    %7D%0A%0A    @Override%0A    public int getItemCount() %7B%0A        return cursor == null ? 0 : cursor.getCount();%0A    %7D%0A%0A    /**%0A     * Change the SquidCursor backing the adapter. If there is an existing SquidCursor it will be closed.%0A     *%0A     * @param newCursor the new SquidCursor%0A     */%0A    public void changeCursor(SquidCursor%3CM%3E newCursor) %7B%0A        SquidCursor%3CM%3E oldCursor = swapCursor(newCursor);%0A        if (oldCursor != null) %7B%0A            oldCursor.close();%0A        %7D%0A    %7D%0A%0A    /**%0A     * Change the SquidCursor backing the adapter, returning the old one. Unlike %7B@link #changeCursor(SquidCursor)%7D,%0A     * the returned old SquidCursor is %3Cem%3Enot%3C/em%3E closed.%0A     *%0A     * @param newCursor the new SquidCursor%0A     * @return Returns the previously set SquidCursor. If no SquidCursor was previously set, new SquidCursor is the%0A     * same instance is the previously set one, null is returned.%0A     */%0A    public SquidCursor%3CM%3E swapCursor(SquidCursor%3CM%3E newCursor) %7B%0A        if (cursor == newCursor) %7B%0A            return null;%0A        %7D%0A        SquidCursor%3CM%3E oldCursor = cursor;%0A        cursor = newCursor;%0A        notifyDataSetChanged();%0A        return oldCursor;%0A    %7D%0A%7D%0A

Add basic RecyclerView.Adapter implementation