kr.co.hanwha.hifive.adapter

## Class AddTaskSelectCampaignListAdapter

- java.lang.Object
- - android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>
  - - kr.co.hanwha.hifive.adapter.AddTaskSelectCampaignListAdapter

- All Implemented Interfaces:
    android.widget.Filterable, AddTaskSelectCampaignListContract.Model, AddTaskSelectCampaignListContract.View

      public class AddTaskSelectCampaignListAdapter
      extends android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>
      implements AddTaskSelectCampaignListContract.Model, AddTaskSelectCampaignListContract.View, android.widget.Filterable

  Created by sanghoonkwon on 2018. 2. 21..

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.ArrayList<ProjectCampaignData>` | `mListData`
    `private java.util.ArrayList<CampaignData>` | `mListSearchData`
    `private AddTaskSelectCampaignListContract.OnSelectCampaignListListener` | `mOnSelectCampaignListListener`
    `private java.lang.String` | `mSearchWord`
    `private java.lang.String` | `mSelectedCampaignKey`
    `private java.util.Comparator<ProjectCampaignData>` | `sortProject`
    `private int` | `ZERO`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AddTaskSelectCampaignListAdapter(AddTaskSelectCampaignListContract.OnSelectCampaignListListener onSelectCampaignListListener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addItem(ProjectCampaignData data, int index)`
    `void` | `addItems(java.util.ArrayList<ProjectCampaignData> list)`
    `void` | `clearItems()` Model
    `android.widget.Filter` | `getFilter()` Filterable
    `int` | `getItemCount()`
    `void` | `notifyDataAll()` ViewActivity
    `void` | `notifyDataRangeChanged(int positionStart, int itemCount)`
    `void` | `onBindViewHolder(android.support.v7.widget.RecyclerView.ViewHolder holder, int position)`
    `android.support.v7.widget.RecyclerView.ViewHolder` | `onCreateViewHolder(android.view.ViewGroup parent, int viewType)` Adapter
    `void` | `setSelectedCampaignKey(java.lang.String selectedCampaignKey)`

    - ### Methods inherited from class android.support.v7.widget.RecyclerView.Adapter

      `bindViewHolder, createViewHolder, getItemId, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ZERO

          private final int ZERO

      See Also:
        Constant Field Values

    - #### mSearchWord

          private java.lang.String mSearchWord

    - #### mSelectedCampaignKey

          private java.lang.String mSelectedCampaignKey

    - #### mOnSelectCampaignListListener

          private AddTaskSelectCampaignListContract.OnSelectCampaignListListener mOnSelectCampaignListListener

    - #### mListData

          private java.util.ArrayList<ProjectCampaignData> mListData

    - #### mListSearchData

          private java.util.ArrayList<CampaignData> mListSearchData

    - #### sortProject

          private java.util.Comparator<ProjectCampaignData> sortProject

  - ### Constructor Detail

    - #### AddTaskSelectCampaignListAdapter

          public AddTaskSelectCampaignListAdapter(AddTaskSelectCampaignListContract.OnSelectCampaignListListener onSelectCampaignListListener)

  - ### Method Detail

    - #### notifyDataAll

          public void notifyDataAll()

      ViewActivity
      Specified by:
        `notifyDataAll` in interface `AddTaskSelectCampaignListContract.View`

    - #### notifyDataRangeChanged

          public void notifyDataRangeChanged(int positionStart,
                                             int itemCount)

      Specified by:
        `notifyDataRangeChanged` in interface `AddTaskSelectCampaignListContract.View`

    - #### clearItems

          public void clearItems()

      Model
      Specified by:
        `clearItems` in interface `AddTaskSelectCampaignListContract.Model`

    - #### addItem

          public void addItem(ProjectCampaignData data,
                              int index)

      Specified by:
        `addItem` in interface `AddTaskSelectCampaignListContract.Model`

    - #### addItems

          public void addItems(java.util.ArrayList<ProjectCampaignData> list)

      Specified by:
        `addItems` in interface `AddTaskSelectCampaignListContract.Model`

    - #### setSelectedCampaignKey

          public void setSelectedCampaignKey(java.lang.String selectedCampaignKey)

      Specified by:
        `setSelectedCampaignKey` in interface `AddTaskSelectCampaignListContract.Model`

    - #### onCreateViewHolder

          public android.support.v7.widget.RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent,
                                                                                      int viewType)

      Adapter
      Specified by:
        `onCreateViewHolder` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

    - #### onBindViewHolder

          public void onBindViewHolder(android.support.v7.widget.RecyclerView.ViewHolder holder,
                                       int position)

      Specified by:
        `onBindViewHolder` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

    - #### getItemCount

          public int getItemCount()

      Specified by:
        `getItemCount` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

    - #### getFilter

          public android.widget.Filter getFilter()

      Filterable
      Specified by:
        `getFilter` in interface `android.widget.Filterable`
      Specified by:
        `getFilter` in interface `AddTaskSelectCampaignListContract.Model`