// Path: app/src/main/java/com/paulds/simpleftp/presentation/binders/ItemBinder.java
// public class ItemBinder<T>
// {
//     /**
//      * The id of the binding variable used in recycler view item layout.
//      */
//     protected final int bindingVariable;
// 
//     /**
//      * The id of the layout used for displaying recycler view item.
//      */
//     protected final int layoutId;
// 
//     /**
//      * Default constructor.
//      * @param bindingVariable The id of the binding variable.
//      * @param layoutId The id of the layout used for displaying recycler view item.
//      */
//     public ItemBinder(int bindingVariable, int layoutId)
//     {
//         this.bindingVariable = bindingVariable;
//         this.layoutId = layoutId;
//     }
// 
//     /**
//      * Gets the id of the layout used for displaying recycler view item.
//      * @return The layout id.
//      */
//     public int getLayoutId()
//     {
//         return layoutId;
//     }
// 
//     /**
//      * Gets the binding variable used in recycler view item layout.
//      * @return The binding variable.
//      */
//     public int getBindingVariable()
//     {
//         return bindingVariable;
//     }
// }


import android.databinding.DataBindingUtil;
import android.databinding.ObservableArrayList;
import android.databinding.ObservableList;
import android.databinding.ViewDataBinding;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.paulds.simpleftp.presentation.binders.ItemBinder;
import java.lang.ref.WeakReference;
import java.util.Collection;
package com.paulds.simpleftp.presentation.adapters;




/**
 * Adapter for data binding usage of recycler view.
 * @param <T> The type of object to display in the recycler view.
 */
public class BindingRecyclerViewAdapter<T> extends RecyclerView.Adapter<BindingRecyclerViewAdapter.ViewHolder>
{
    /**
     * Key used to store the item model.
     */
    private static final int ITEM_MODEL = -124;

    /**
     * The callback triggered when the list of items change.
     */
    private final WeakReferenceOnListChangedCallback onListChangedCallback;

    /**
     * The binder used for items display.
     */
// Path: app/src/main/java/com/paulds/simpleftp/presentation/binders/ItemBinder.java
// public class ItemBinder<T>
// {
//     /**
//      * The id of the binding variable used in recycler view item layout.
//      */
//     protected final int bindingVariable;
// 
//     /**
//      * The id of the layout used for displaying recycler view item.
//      */
//     protected final int layoutId;
// 
//     /**
//      * Default constructor.
//      * @param bindingVariable The id of the binding variable.
//      * @param layoutId The id of the layout used for displaying recycler view item.
//      */
//     public ItemBinder(int bindingVariable, int layoutId)
//     {
//         this.bindingVariable = bindingVariable;
//         this.layoutId = layoutId;
//     }
// 
//     /**
//      * Gets the id of the layout used for displaying recycler view item.
//      * @return The layout id.
//      */
//     public int getLayoutId()
//     {
//         return layoutId;
//     }
// 
//     /**
//      * Gets the binding variable used in recycler view item layout.
//      * @return The binding variable.
//      */
//     public int getBindingVariable()
//     {
//         return bindingVariable;
//     }
// }


// Path: app/src/main/java/com/paulds/simpleftp/presentation/adapters/BindingRecyclerViewAdapter.java
import android.databinding.DataBindingUtil;
import android.databinding.ObservableArrayList;
import android.databinding.ObservableList;
import android.databinding.ViewDataBinding;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.paulds.simpleftp.presentation.binders.ItemBinder;
import java.lang.ref.WeakReference;
import java.util.Collection;

package com.paulds.simpleftp.presentation.adapters;




/**
 * Adapter for data binding usage of recycler view.
 * @param <T> The type of object to display in the recycler view.
 */
public class BindingRecyclerViewAdapter<T> extends RecyclerView.Adapter<BindingRecyclerViewAdapter.ViewHolder>
{
    /**
     * Key used to store the item model.
     */
    private static final int ITEM_MODEL = -124;

    /**
     * The callback triggered when the list of items change.
     */
    private final WeakReferenceOnListChangedCallback onListChangedCallback;

    /**
     * The binder used for items display.
     */
    private final ItemBinder<T> itemBinder;