public class FastItemAdapter<Item extends IItem>
extends <any>
| Constructor and Description |
|---|
FastItemAdapter()
ctor
|
| Modifier and Type | Method and Description |
|---|---|
FastItemAdapter<Item> |
add(int position,
Item... items)
add an array of items at the given position within the existing items
|
FastItemAdapter<Item> |
add(int position,
Item item)
add an item at the given position within the existing icons
|
FastItemAdapter<Item> |
add(int position,
java.util.List<Item> items)
add a list of items at the given position within the existing items
|
FastItemAdapter<Item> |
add(Item... items)
add an array of items to the end of the existing items
|
FastItemAdapter<Item> |
add(Item item)
add an item at the end of the existing items
|
FastItemAdapter<Item> |
add(java.util.List<Item> items)
add a list of items to the end of the existing items
|
FastItemAdapter<Item> |
clear()
removes all items of this adapter
|
void |
filter(java.lang.CharSequence constraint)
filters the items with the constraint using the provided Predicate
|
Item |
getAdapterItem(int position) |
int |
getAdapterItemCount() |
java.util.List<Item> |
getAdapterItems() |
int |
getAdapterPosition(Item item)
Searches for the given item and calculates its relative position
|
int |
getGlobalPosition(int position)
returns the global position if the relative position within this adapter was given
|
<any> |
getItemAdapter()
returns the internal created ItemAdapter
|
<any> |
getItemFilter() |
int |
getOrder() |
FastItemAdapter<Item> |
move(int fromPosition,
int toPosition)
moves an item within the list from a position to a position
|
void |
remapMappedTypes()
convenient functions, to force to remap all possible types for the RecyclerView
|
FastItemAdapter<Item> |
remove(int position)
removes an item at the given position within the existing icons
|
FastItemAdapter<Item> |
removeItemRange(int position,
int itemCount)
removes a range of items starting with the given position within the existing icons
|
FastItemAdapter<Item> |
set(int position,
Item item)
sets an item at the given position, overwriting the previous item
|
FastItemAdapter<Item> |
set(java.util.List<Item> items)
set a new list of items and apply it to the existing list (clear - add) for this adapter
|
FastItemAdapter<Item> |
setNewList(java.util.List<Item> items)
sets a complete new list of items onto this adapter, using the new list.
|
FastItemAdapter<Item> |
setNewList(java.util.List<Item> items,
boolean retainFilter)
sets a complete new list of items onto this adapter, using the new list.
|
FastItemAdapter<Item> |
withUseIdDistributor(boolean useIdDistributor)
defines if the IdDistributor is used to provide an ID to all added items which do not yet define an id
|
public <any> getItemAdapter()
public FastItemAdapter<Item> withUseIdDistributor(boolean useIdDistributor)
useIdDistributor - false if the IdDistributor shouldn't be usedpublic <any> getItemFilter()
public void filter(java.lang.CharSequence constraint)
constraint - the string used to filter the listpublic int getOrder()
public int getAdapterItemCount()
public java.util.List<Item> getAdapterItems()
public int getAdapterPosition(Item item)
item - the item which is searched forpublic int getGlobalPosition(int position)
position - the relative postionpublic Item getAdapterItem(int position)
position - the relative positionpublic FastItemAdapter<Item> set(java.util.List<Item> items)
items - the new items to setpublic FastItemAdapter<Item> setNewList(java.util.List<Item> items)
items - the new items to setpublic FastItemAdapter<Item> setNewList(java.util.List<Item> items, boolean retainFilter)
items - the new items to setretainFilter - set to true if you want to keep the filter applied@SafeVarargs public final FastItemAdapter<Item> add(Item... items)
items - the items to addpublic FastItemAdapter<Item> add(java.util.List<Item> items)
items - the items to add@SafeVarargs public final FastItemAdapter<Item> add(int position, Item... items)
position - the global positionitems - the items to addpublic FastItemAdapter<Item> add(int position, java.util.List<Item> items)
position - the global positionitems - the items to addpublic FastItemAdapter<Item> set(int position, Item item)
position - the global positionitem - the item to setpublic FastItemAdapter<Item> add(Item item)
item - the item to addpublic FastItemAdapter<Item> add(int position, Item item)
position - the global positionitem - the item to addpublic FastItemAdapter<Item> move(int fromPosition, int toPosition)
fromPosition - the position global from which we want to movetoPosition - the global position to which to movepublic FastItemAdapter<Item> remove(int position)
position - the global positionpublic FastItemAdapter<Item> removeItemRange(int position, int itemCount)
position - the global positionitemCount - the count of items removedpublic FastItemAdapter<Item> clear()
public void remapMappedTypes()