// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListener.java
// public interface RecyclerViewOnClickListener<T> {
//     void onItemClick(T item);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListenerInternal.java
// public interface RecyclerViewOnClickListenerInternal {
//     void onItemClick(int position);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/models/BroadcastReceiverInfo.java
// public class BroadcastReceiverInfo implements Parcelable, Comparable<BroadcastReceiverInfo> {
//     private String mName;
// 
//     public BroadcastReceiverInfo(
//             String mName) {
//         this.mName = mName;
//     }
// 
// 
//     public String getName() {
//         return mName;
//     }
// 
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(this.mName);
//     }
// 
//     protected BroadcastReceiverInfo(Parcel in) {
//         this.mName = in.readString();
//     }
// 
//     public static final Creator<BroadcastReceiverInfo> CREATOR = new Creator<BroadcastReceiverInfo>() {
//         public BroadcastReceiverInfo createFromParcel(Parcel source) {
//             return new BroadcastReceiverInfo(source);
//         }
// 
//         public BroadcastReceiverInfo[] newArray(int size) {
//             return new BroadcastReceiverInfo[size];
//         }
//     };
// 
//     @Override
//     public int compareTo(BroadcastReceiverInfo another) {
//         return this.getName().compareToIgnoreCase(another.getName());
//     }
// }


import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.livingstoneapp.R;
import com.livingstoneapp.helpers.RecyclerViewOnClickListener;
import com.livingstoneapp.helpers.RecyclerViewOnClickListenerInternal;
import com.livingstoneapp.models.BroadcastReceiverInfo;
    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return
                new ViewHolder(
                        LayoutInflater.from(parent.getContext())
                                .inflate(R.layout.app_info_broadcast_receivers_adapter_layout, parent, false),
                        position -> {
                            if (mListener != null) {
                                mListener.onItemClick(mData.get(position));
                            }
                        });
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        holder.tvName.setText(mData.get(position).getName());
    }

    @Override
    public int getItemCount() {
        return mData.size();
    }

    public static class ViewHolder extends RecyclerView.ViewHolder {

        private RecyclerViewOnClickListenerInternal mListener;

        @Bind(R.id.tvName)
        public TextView tvName;

// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListener.java
// public interface RecyclerViewOnClickListener<T> {
//     void onItemClick(T item);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/helpers/RecyclerViewOnClickListenerInternal.java
// public interface RecyclerViewOnClickListenerInternal {
//     void onItemClick(int position);
// }
// 
// Path: app/src/main/java/com/livingstoneapp/models/BroadcastReceiverInfo.java
// public class BroadcastReceiverInfo implements Parcelable, Comparable<BroadcastReceiverInfo> {
//     private String mName;
// 
//     public BroadcastReceiverInfo(
//             String mName) {
//         this.mName = mName;
//     }
// 
// 
//     public String getName() {
//         return mName;
//     }
// 
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(this.mName);
//     }
// 
//     protected BroadcastReceiverInfo(Parcel in) {
//         this.mName = in.readString();
//     }
// 
//     public static final Creator<BroadcastReceiverInfo> CREATOR = new Creator<BroadcastReceiverInfo>() {
//         public BroadcastReceiverInfo createFromParcel(Parcel source) {
//             return new BroadcastReceiverInfo(source);
//         }
// 
//         public BroadcastReceiverInfo[] newArray(int size) {
//             return new BroadcastReceiverInfo[size];
//         }
//     };
// 
//     @Override
//     public int compareTo(BroadcastReceiverInfo another) {
//         return this.getName().compareToIgnoreCase(another.getName());
//     }
// }


// Path: app/src/main/java/com/livingstoneapp/adapters/BroadcastReceiversListAdapter.java
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.livingstoneapp.R;
import com.livingstoneapp.helpers.RecyclerViewOnClickListener;
import com.livingstoneapp.helpers.RecyclerViewOnClickListenerInternal;
import com.livingstoneapp.models.BroadcastReceiverInfo;

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return
                new ViewHolder(
                        LayoutInflater.from(parent.getContext())
                                .inflate(R.layout.app_info_broadcast_receivers_adapter_layout, parent, false),
                        position -> {
                            if (mListener != null) {
                                mListener.onItemClick(mData.get(position));
                            }
                        });
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        holder.tvName.setText(mData.get(position).getName());
    }

    @Override
    public int getItemCount() {
        return mData.size();
    }

    public static class ViewHolder extends RecyclerView.ViewHolder {

        private RecyclerViewOnClickListenerInternal mListener;

        @Bind(R.id.tvName)
        public TextView tvName;

        public ViewHolder(View v, RecyclerViewOnClickListenerInternal listener) {