// Path: autoadapter/src/main/java/com/benny/library/autoadapter/listener/DataSetChangedNotifier.java
// public interface DataSetChangedNotifier {
//     void notifyDataSetChanged();
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewcreator/IViewCreator.java
// public interface IViewCreator<T> {
//     View view(ViewGroup container);
//     int viewTypeFor(T data, int position, int itemCount);
//     int viewTypeCount();
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/DataGetter.java
// public class DataGetter<T> {
//     final public T previous;
//     final public T next;
//     final public T data;
// 
//     public DataGetter(T previous, T data, T next) {
//         this.previous = previous;
//         this.next = next;
//         this.data = data;
//     }
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/IViewHolder.java
// public interface IViewHolder<T> {
//     void bind(View view);
//     void onDataChange(DataGetter<T> getter, int position);
// }


import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import com.benny.library.autoadapter.listener.DataSetChangedNotifier;
import com.benny.library.autoadapter.viewcreator.IViewCreator;
import com.benny.library.autoadapter.viewholder.DataGetter;
import com.benny.library.autoadapter.viewholder.IViewHolder;
import java.util.List;
    public void setEmptyView(View view) {
        emptyView = view;
    }

    protected class ViewHolder extends RecyclerView.ViewHolder {
        public ViewHolder(final View itemView) {
            super(itemView);

            if(itemClickListener != null) {
                itemView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        itemClickListener.onItemClick(null, itemView, getLayoutPosition(), 0);
                    }
                });
            }

            if(itemLongClickListener != null) {
                itemView.setOnLongClickListener(new View.OnLongClickListener() {
                    @Override
                    public boolean onLongClick(View v) {
                        itemLongClickListener.onItemLongClick(null, itemView, getLayoutPosition(), 0);
                        return true;
                    }
                });
            }
        }

        @SuppressWarnings("unchecked")
        void notifyDataChange(DataGetter<T> getter, int position) {
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/listener/DataSetChangedNotifier.java
// public interface DataSetChangedNotifier {
//     void notifyDataSetChanged();
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewcreator/IViewCreator.java
// public interface IViewCreator<T> {
//     View view(ViewGroup container);
//     int viewTypeFor(T data, int position, int itemCount);
//     int viewTypeCount();
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/DataGetter.java
// public class DataGetter<T> {
//     final public T previous;
//     final public T next;
//     final public T data;
// 
//     public DataGetter(T previous, T data, T next) {
//         this.previous = previous;
//         this.next = next;
//         this.data = data;
//     }
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/IViewHolder.java
// public interface IViewHolder<T> {
//     void bind(View view);
//     void onDataChange(DataGetter<T> getter, int position);
// }


// Path: autoadapter/src/main/java/com/benny/library/autoadapter/AutoRecyclerAdapter.java
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import com.benny.library.autoadapter.listener.DataSetChangedNotifier;
import com.benny.library.autoadapter.viewcreator.IViewCreator;
import com.benny.library.autoadapter.viewholder.DataGetter;
import com.benny.library.autoadapter.viewholder.IViewHolder;
import java.util.List;

    public void setEmptyView(View view) {
        emptyView = view;
    }

    protected class ViewHolder extends RecyclerView.ViewHolder {
        public ViewHolder(final View itemView) {
            super(itemView);

            if(itemClickListener != null) {
                itemView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        itemClickListener.onItemClick(null, itemView, getLayoutPosition(), 0);
                    }
                });
            }

            if(itemLongClickListener != null) {
                itemView.setOnLongClickListener(new View.OnLongClickListener() {
                    @Override
                    public boolean onLongClick(View v) {
                        itemLongClickListener.onItemLongClick(null, itemView, getLayoutPosition(), 0);
                        return true;
                    }
                });
            }
        }

        @SuppressWarnings("unchecked")
        void notifyDataChange(DataGetter<T> getter, int position) {
            ((IViewHolder<T>)itemView.getTag()).onDataChange(getter, position);