kr.co.hanwha.hifive.adapter

## Class TaskDetailListAdapter

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

- All Implemented Interfaces:
    TaskDetailListContract.Model, TaskDetailListContract.View

      public class TaskDetailListAdapter
      extends android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>
      implements TaskDetailListContract.Model, TaskDetailListContract.View

  TASK 상세 리스트 어댑터(TASK 상세 & 댓글)
  See Also:
    `Created by sanghoonkwon on 2018. 1. 22..`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `COUNT_COMMENT_EMPTY`
    `private int` | `COUNT_COMMENT_HEADER`
    `private int` | `COUNT_HEADER`
    `private android.content.Context` | `mContext`
    `private int` | `mEmptyHeight`
    `private int` | `mFlag`
    `private java.util.ArrayList<MessageListData>` | `mListData`
    `private TaskDetailListContract.OnTaskDetailListener` | `mOnTaskDetailListener`
    `private TaskDetailRoot` | `mTaskData`
    `private int` | `mTotalCount`
    `private int` | `TYPE_COMMENT_CONTENT`
    `private int` | `TYPE_COMMENT_EMPTY`
    `private int` | `TYPE_COMMENT_HEADER`
    `private int` | `TYPE_TASK_HEADER`
    `private int` | `ZERO`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskDetailListAdapter(android.content.Context context, TaskDetailListContract.OnTaskDetailListener onTaskDetailListener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addItem(MessageListData data)`
    `void` | `addItem(MessageListData data, int index)`
    `void` | `addItems(java.util.ArrayList<MessageListData> list)`
    `void` | `clearItems()`
    `private int` | `getCommentCount()`
    `private int` | `getCommentIndex(int position)`
    `int` | `getItemCount()`
    `int` | `getItemViewType(int position)` Adapter
    `void` | `notifyDataAll()` ViewActivity
    `void` | `notifyDataAllWithoutHeader()`
    `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)`
    `void` | `setFlag(int flag)`
    `void` | `setTaskItem(TaskDetailRoot taskDetailRoot)`
    `void` | `setTotalCount(int totalCount)` Model

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

      `bindViewHolder, createViewHolder, getItemId, 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

    - #### COUNT_HEADER

          private final int COUNT_HEADER

      See Also:
        Constant Field Values

    - #### COUNT_COMMENT_HEADER

          private final int COUNT_COMMENT_HEADER

      See Also:
        Constant Field Values

    - #### COUNT_COMMENT_EMPTY

          private final int COUNT_COMMENT_EMPTY

      See Also:
        Constant Field Values

    - #### TYPE_TASK_HEADER

          private final int TYPE_TASK_HEADER

      See Also:
        Constant Field Values

    - #### TYPE_COMMENT_HEADER

          private final int TYPE_COMMENT_HEADER

      See Also:
        Constant Field Values

    - #### TYPE_COMMENT_CONTENT

          private final int TYPE_COMMENT_CONTENT

      See Also:
        Constant Field Values

    - #### TYPE_COMMENT_EMPTY

          private final int TYPE_COMMENT_EMPTY

      See Also:
        Constant Field Values

    - #### mContext

          private android.content.Context mContext

    - #### mTaskData

          private TaskDetailRoot mTaskData

    - #### mListData

          private java.util.ArrayList<MessageListData> mListData

    - #### mEmptyHeight

          private int mEmptyHeight

    - #### mTotalCount

          private int mTotalCount

    - #### mFlag

          private int mFlag

    - #### mOnTaskDetailListener

          private TaskDetailListContract.OnTaskDetailListener mOnTaskDetailListener

  - ### Constructor Detail

    - #### TaskDetailListAdapter

          public TaskDetailListAdapter(android.content.Context context,
                                       TaskDetailListContract.OnTaskDetailListener onTaskDetailListener)

  - ### Method Detail

    - #### setFlag

          public void setFlag(int flag)

    - #### notifyDataAll

          public void notifyDataAll()

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

    - #### notifyDataAllWithoutHeader

          public void notifyDataAllWithoutHeader()

      Specified by:
        `notifyDataAllWithoutHeader` in interface `TaskDetailListContract.View`

    - #### notifyDataRangeChanged

          public void notifyDataRangeChanged(int positionStart,
                                             int itemCount)

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

    - #### setTotalCount

          public void setTotalCount(int totalCount)

      Model
      Specified by:
        `setTotalCount` in interface `TaskDetailListContract.Model`

    - #### clearItems

          public void clearItems()

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

    - #### setTaskItem

          public void setTaskItem(TaskDetailRoot taskDetailRoot)

      Specified by:
        `setTaskItem` in interface `TaskDetailListContract.Model`

    - #### addItem

          public void addItem(MessageListData data)

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

    - #### addItem

          public void addItem(MessageListData data,
                              int index)

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

    - #### addItems

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

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

    - #### getItemViewType

          public int getItemViewType(int position)

      Adapter
      Overrides:
        `getItemViewType` in class `android.support.v7.widget.RecyclerView.Adapter<android.support.v7.widget.RecyclerView.ViewHolder>`

    - #### onCreateViewHolder

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

      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>`

    - #### getCommentIndex

          private int getCommentIndex(int position)

    - #### getCommentCount

          private int getCommentCount()