// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/base/IViewHolderFactory.java
// public interface IViewHolderFactory {
// 
//     /**
//      * Creates a {@link ViewHolder} for the passed type
//      *
//      * @param parent The ViewGroup into which the new View will be added after it is bound to
//      *               an adapter position.
//      * @return the newly created {@link ViewHolder}
//      */
//     @NonNull
//     ViewHolder createViewHolder(@NonNull final ViewGroup parent, final int itemType);
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/viewholder/AdViewHolder.java
// public class AdViewHolder extends SimpleViewHolder<Ad> {
// 
//     @NonNull
//     private final TextView headerTextView;
// 
//     public AdViewHolder(final View itemView) {
//         super(itemView);
// 
//         headerTextView = ViewUtils.find(itemView, R.id.item_textView_header);
//     }
// 
//     @Override
//     public void bind(@NonNull final Ad model) {
//         headerTextView.setText(model.header());
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/viewholder/CountryViewHolder.java
// public final class CountryViewHolder extends SimpleViewHolder<Country> {
// 
//     @NonNull
//     private final TextView mCountryName;
// 
//     @NonNull
//     private final TextView mCapital;
// 
//     public CountryViewHolder(@NonNull final View itemView) {
//         super(itemView);
// 
//         mCountryName = ViewUtils.find(itemView, R.id.item_textView_country);
//         mCapital = ViewUtils.find(itemView, R.id.item_textView_capital);
//     }
// 
//     @Override
//     public void bind(@NonNull final Country model) {
//         populateWith(model);
//     }
// 
//     private void populateWith(@NonNull final Country country) {
//         mCountryName.setText(country.getName());
//         mCapital.setText(country.getCapital());
//     }
// }


import com.lucilu.rxdynamicsearch.R;
import com.lucilu.rxdynamicsearch.ui.adapter.base.IViewHolderFactory;
import com.lucilu.rxdynamicsearch.ui.adapter.viewholder.AdViewHolder;
import com.lucilu.rxdynamicsearch.ui.adapter.viewholder.CountryViewHolder;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import static com.lucilu.rxdynamicsearch.Constants.ListItem.AD;
import static com.lucilu.rxdynamicsearch.Constants.ListItem.COUNTRY;
package com.lucilu.rxdynamicsearch.ui.adapter;




public final class CountryListViewHolderFactory implements IViewHolderFactory {

    @NonNull
    private final Context mContext;

    public CountryListViewHolderFactory(@NonNull final Context context) {
        mContext = context;
    }

    @NonNull
    @Override
    public ViewHolder createViewHolder(@NonNull final ViewGroup parent, final int itemType) {
        switch (itemType) {
            case COUNTRY:
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/base/IViewHolderFactory.java
// public interface IViewHolderFactory {
// 
//     /**
//      * Creates a {@link ViewHolder} for the passed type
//      *
//      * @param parent The ViewGroup into which the new View will be added after it is bound to
//      *               an adapter position.
//      * @return the newly created {@link ViewHolder}
//      */
//     @NonNull
//     ViewHolder createViewHolder(@NonNull final ViewGroup parent, final int itemType);
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/viewholder/AdViewHolder.java
// public class AdViewHolder extends SimpleViewHolder<Ad> {
// 
//     @NonNull
//     private final TextView headerTextView;
// 
//     public AdViewHolder(final View itemView) {
//         super(itemView);
// 
//         headerTextView = ViewUtils.find(itemView, R.id.item_textView_header);
//     }
// 
//     @Override
//     public void bind(@NonNull final Ad model) {
//         headerTextView.setText(model.header());
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/viewholder/CountryViewHolder.java
// public final class CountryViewHolder extends SimpleViewHolder<Country> {
// 
//     @NonNull
//     private final TextView mCountryName;
// 
//     @NonNull
//     private final TextView mCapital;
// 
//     public CountryViewHolder(@NonNull final View itemView) {
//         super(itemView);
// 
//         mCountryName = ViewUtils.find(itemView, R.id.item_textView_country);
//         mCapital = ViewUtils.find(itemView, R.id.item_textView_capital);
//     }
// 
//     @Override
//     public void bind(@NonNull final Country model) {
//         populateWith(model);
//     }
// 
//     private void populateWith(@NonNull final Country country) {
//         mCountryName.setText(country.getName());
//         mCapital.setText(country.getCapital());
//     }
// }


// Path: app/src/main/java/com/lucilu/rxdynamicsearch/ui/adapter/CountryListViewHolderFactory.java
import com.lucilu.rxdynamicsearch.R;
import com.lucilu.rxdynamicsearch.ui.adapter.base.IViewHolderFactory;
import com.lucilu.rxdynamicsearch.ui.adapter.viewholder.AdViewHolder;
import com.lucilu.rxdynamicsearch.ui.adapter.viewholder.CountryViewHolder;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import static com.lucilu.rxdynamicsearch.Constants.ListItem.AD;
import static com.lucilu.rxdynamicsearch.Constants.ListItem.COUNTRY;

package com.lucilu.rxdynamicsearch.ui.adapter;




public final class CountryListViewHolderFactory implements IViewHolderFactory {

    @NonNull
    private final Context mContext;

    public CountryListViewHolderFactory(@NonNull final Context context) {
        mContext = context;
    }

    @NonNull
    @Override
    public ViewHolder createViewHolder(@NonNull final ViewGroup parent, final int itemType) {
        switch (itemType) {
            case COUNTRY:
                return new CountryViewHolder(LayoutInflater.from(mContext)