// 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/PathPermission.java
// public class PathPermission implements Parcelable {
// 
//     private String mPath;
//     private String mType;
//     private String mWritePermission;
//     private String mReadPermission;
// 
//     public PathPermission(String mPath, String mReadPermission, String mWritePermission, String mType) {
//         this.mPath = mPath;
//         this.mReadPermission = mReadPermission;
//         this.mType = mType;
//         this.mWritePermission = mWritePermission;
//     }
// 
//     public String getPath() {
//         return mPath;
//     }
// 
//     public String getReadPermission() {
//         return mReadPermission;
//     }
// 
//     public String getType() {
//         return mType;
//     }
// 
//     public String getWritePermission() {
//         return mWritePermission;
//     }
// 
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(this.mPath);
//         dest.writeString(this.mType);
//         dest.writeString(this.mWritePermission);
//         dest.writeString(this.mReadPermission);
//     }
// 
//     protected PathPermission(Parcel in) {
//         this.mPath = in.readString();
//         this.mType = in.readString();
//         this.mWritePermission = in.readString();
//         this.mReadPermission = in.readString();
//     }
// 
//     public static final Parcelable.Creator<PathPermission> CREATOR = new Parcelable.Creator<PathPermission>() {
//         public PathPermission createFromParcel(Parcel source) {
//             return new PathPermission(source);
//         }
// 
//         public PathPermission[] newArray(int size) {
//             return new PathPermission[size];
//         }
//     };
// }


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

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        PathPermission pp = mData.get(position);

        holder.tvPath.setText(pp.getPath());
        holder.tvType.setText(pp.getType());
        holder.tvReadPermission.setText(pp.getReadPermission());
        holder.tvWritePermission.setText(pp.getWritePermission());
    }

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

    public static class ViewHolder extends RecyclerView.ViewHolder {

// 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/PathPermission.java
// public class PathPermission implements Parcelable {
// 
//     private String mPath;
//     private String mType;
//     private String mWritePermission;
//     private String mReadPermission;
// 
//     public PathPermission(String mPath, String mReadPermission, String mWritePermission, String mType) {
//         this.mPath = mPath;
//         this.mReadPermission = mReadPermission;
//         this.mType = mType;
//         this.mWritePermission = mWritePermission;
//     }
// 
//     public String getPath() {
//         return mPath;
//     }
// 
//     public String getReadPermission() {
//         return mReadPermission;
//     }
// 
//     public String getType() {
//         return mType;
//     }
// 
//     public String getWritePermission() {
//         return mWritePermission;
//     }
// 
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(this.mPath);
//         dest.writeString(this.mType);
//         dest.writeString(this.mWritePermission);
//         dest.writeString(this.mReadPermission);
//     }
// 
//     protected PathPermission(Parcel in) {
//         this.mPath = in.readString();
//         this.mType = in.readString();
//         this.mWritePermission = in.readString();
//         this.mReadPermission = in.readString();
//     }
// 
//     public static final Parcelable.Creator<PathPermission> CREATOR = new Parcelable.Creator<PathPermission>() {
//         public PathPermission createFromParcel(Parcel source) {
//             return new PathPermission(source);
//         }
// 
//         public PathPermission[] newArray(int size) {
//             return new PathPermission[size];
//         }
//     };
// }


// Path: app/src/main/java/com/livingstoneapp/adapters/PathPermissionAdapter.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.PathPermission;

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

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        PathPermission pp = mData.get(position);

        holder.tvPath.setText(pp.getPath());
        holder.tvType.setText(pp.getType());
        holder.tvReadPermission.setText(pp.getReadPermission());
        holder.tvWritePermission.setText(pp.getWritePermission());
    }

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

    public static class ViewHolder extends RecyclerView.ViewHolder {

        private RecyclerViewOnClickListenerInternal mListener;