public class GenericFastItemAdapter<Model,Item extends IGenericItem<Model,Item,?>> extends FastAdapter<Item>
FastAdapter.OnBindViewHolderListener, FastAdapter.OnBindViewHolderListenerImpl, FastAdapter.OnClickListener<Item extends IItem>, FastAdapter.OnCreateViewHolderListener, FastAdapter.OnCreateViewHolderListenerImpl, FastAdapter.OnLongClickListener<Item extends IItem>, FastAdapter.OnTouchListener<Item extends IItem>, FastAdapter.RelativeInfo<Item extends IItem>BUNDLE_EXPANDED, BUNDLE_SELECTIONS| Constructor and Description |
|---|
GenericFastItemAdapter(java.lang.Class<? extends Item> itemClass,
java.lang.Class<? extends Model> modelClass) |
GenericFastItemAdapter(Function<Model,Item> itemFactory) |
| Modifier and Type | Method and Description |
|---|---|
GenericFastItemAdapter<Model,Item> |
addModel(int position,
java.util.List<Model> models)
add a list of models at a given (global) position
|
GenericFastItemAdapter<Model,Item> |
addModel(int position,
Model... models)
add an array of models at a given (global) position
|
GenericFastItemAdapter<Model,Item> |
addModel(java.util.List<Model> models)
add a list of models
|
GenericFastItemAdapter<Model,Item> |
addModel(Model... models)
add an array of models
|
GenericFastItemAdapter<Model,Item> |
clearModel()
clear all models
|
GenericItemAdapter<Model,Item> |
getGenericItemAdapter()
returns the internal created GenericItemAdapter
|
java.util.List<Model> |
getModels()
returns the list of the model generated from the list of items
|
GenericFastItemAdapter<Model,Item> |
moveModel(int fromPosition,
int toPosition)
moves an model within the list from a position to a position
|
GenericFastItemAdapter<Model,Item> |
removeModel(int position)
remove a model at the given (global) position
|
GenericFastItemAdapter<Model,Item> |
removeModelRange(int position,
int itemCount)
remove a range oof model items starting with the (global) position and the size
|
GenericFastItemAdapter<Model,Item> |
setModel(int position,
Model model)
set a model at a given position
|
GenericFastItemAdapter<Model,Item> |
setModel(java.util.List<Model> models)
set a new list of models for this adapter
|
GenericFastItemAdapter<Model,Item> |
setNewModel(java.util.List<Model> models)
sets a complete new list of items onto this adapter, using the new list.
|
collapse, collapse, collapse, collapse, deleteAllSelectedItems, deselect, deselect, deselect, expand, expand, getAdapter, getExpanded, getExpandedItems, getExpandedItemsCount, getHolderAdapterPosition, getItem, getItemCount, getItemId, getItemViewType, getPosition, getPreItemCount, getPreItemCountByOrder, getRelativeInfo, getSelectedItems, getSelections, getTypeInstance, isOnlyOneExpandedItem, isPositionBasedStateManagement, isSelectable, notifyAdapterDataSetChanged, notifyAdapterItemChanged, notifyAdapterItemChanged, notifyAdapterItemInserted, notifyAdapterItemMoved, notifyAdapterItemRangeChanged, notifyAdapterItemRangeChanged, notifyAdapterItemRangeInserted, notifyAdapterItemRangeRemoved, notifyAdapterItemRemoved, notifyAdapterSubItemsChanged, notifyAdapterSubItemsChanged, onBindViewHolder, onBindViewHolder, onCreateViewHolder, registerAdapter, registerTypeInstance, saveInstanceState, saveInstanceState, select, select, select, select, select, select, toggleExpandable, toggleSelection, withAllowDeselection, withMultiSelect, withOnBindViewHolderListener, withOnClickListener, withOnCreateViewHolderListener, withOnLongClickListener, withOnlyOneExpandedItem, withOnPreClickListener, withOnPreLongClickListener, withOnTouchListener, withPositionBasedStateManagement, withSavedInstanceState, withSavedInstanceState, withSelectable, withSelectOnLongClick, withSelectWithItemUpdatebindViewHolder, createViewHolder, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserverpublic GenericFastItemAdapter(java.lang.Class<? extends Item> itemClass, java.lang.Class<? extends Model> modelClass)
itemClass - the class of your item (Item extends GenericAbstractItem)modelClass - the class which is your model classpublic GenericItemAdapter<Model,Item> getGenericItemAdapter()
public java.util.List<Model> getModels()
public GenericFastItemAdapter<Model,Item> setModel(java.util.List<Model> models)
models - the set modelspublic GenericFastItemAdapter<Model,Item> setNewModel(java.util.List<Model> models)
models - the set models@SafeVarargs public final GenericFastItemAdapter<Model,Item> addModel(Model... models)
models - the added modelspublic GenericFastItemAdapter<Model,Item> addModel(java.util.List<Model> models)
models - the added models@SafeVarargs public final GenericFastItemAdapter<Model,Item> addModel(int position, Model... models)
position - the global positionmodels - the added modelspublic GenericFastItemAdapter<Model,Item> addModel(int position, java.util.List<Model> models)
position - the global positionmodels - the added modelspublic GenericFastItemAdapter<Model,Item> setModel(int position, Model model)
position - the global positionmodel - the set modelpublic GenericFastItemAdapter<Model,Item> clearModel()
public GenericFastItemAdapter<Model,Item> moveModel(int fromPosition, int toPosition)
fromPosition - the position global from which we want to movetoPosition - the global position to which to movepublic GenericFastItemAdapter<Model,Item> removeModelRange(int position, int itemCount)
position - the global positionitemCount - the count of items which were removedpublic GenericFastItemAdapter<Model,Item> removeModel(int position)
position - the global position