@@ -0,0 +1,1172 @@
+package com.omega_r.libs.omegarecyclerview;%0A%0A%0Aimport android.support.v7.widget.RecyclerView;%0A%0Aimport java.util.Arrays;%0A%0Apublic abstract class BaseArrayAdapter%3CM, VH extends RecyclerView.ViewHolder%3E extends RecyclerView.Adapter%3CVH%3E %7B%0A%0A    private M%5B%5D mArray;%0A%0A    public BaseArrayAdapter(M%5B%5D array) %7B%0A        mArray = array;%0A    %7D%0A%0A    public int getItemCount() %7B%0A        return mArray.length;%0A    %7D%0A%0A    public M getItem(int position) %7B%0A        return mArray%5Bposition%5D;%0A    %7D%0A%0A    public void set(M... array) %7B%0A        mArray = array;%0A        notifyDataSetChanged();%0A    %7D%0A%0A    public void add(M... array) %7B%0A        concatAll(mArray, array);%0A        notifyItemRangeInserted(mArray.length, array.length);%0A    %7D%0A%0A    private static %3CT%3E T%5B%5D concatAll(T%5B%5D first, T%5B%5D... rest) %7B%0A        int totalLength = first.length;%0A%0A        for (T%5B%5D array : rest) %7B%0A            totalLength += array.length;%0A        %7D%0A%0A        T%5B%5D result = Arrays.copyOf(first, totalLength);%0A        int offset = first.length;%0A%0A        for (T%5B%5D array : rest) %7B%0A            System.arraycopy(array, 0, result, offset, array.length);%0A            offset += array.length;%0A        %7D%0A%0A        return result;%0A    %7D%0A%7D

add BaseArrayAdapter