/** * removes all items of this adapter */ public FastAdapterDialog<Item> clear() { mItemAdapter.clear(); return this; } }
/** * moves an item within the list from a position to a position * * @param fromPosition the position global from which we want to move * @param toPosition the global position to which to move * @return this */ public FastAdapterDialog<Item> move(int fromPosition, int toPosition) { mItemAdapter.move(fromPosition, toPosition); return this; }
/** * removes an item at the given position within the existing icons * * @param position the global position */ public FastAdapterBottomSheetDialog<Item> remove(int position) { mItemAdapter.remove(position); return this; }
/** * add a list of items at the given position within the existing items * * @param position the global position * @param items the items to add */ public FastAdapterDialog<Item> add(int position, List<Item> items) { mItemAdapter.add(position, items); return this; }
/** * set a new list of items and apply it to the existing list (clear - add) for this adapter * * @param items the new items to set */ public FastAdapterDialog<Item> set(List<Item> items) { mItemAdapter.set(items); return this; }
/** * static method to retrieve a new `ItemAdapter` * * @return a new ItemAdapter */ public static <Item extends IItem> ItemAdapter<Item> items() { return new ItemAdapter<>(); } }
/** * sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged * * @param items the new items to set */ public FastAdapterDialog<Item> setNewList(List<Item> items) { mItemAdapter.setNewList(items); return this; }
/** * removes a range of items starting with the given position within the existing icons * * @param position the global position * @param itemCount the count of items removed */ public FastAdapterBottomSheetDialog<Item> removeItemRange(int position, int itemCount) { mItemAdapter.removeRange(position, itemCount); return this; }
/** * static method to retrieve a new `ItemAdapter` * * @return a new ItemAdapter */ public static <Model, Item extends IItem> ModelAdapter<Model, Item> models(IInterceptor<Model, Item> interceptor) { return new ModelAdapter<>(interceptor); }
/** * sets an item at the given position, overwriting the previous item * * @param position the global position * @param element the item to set */ public ModelAdapter<Model, Item> set(int position, Model element) { Item item = intercept(element); if (item == null) return this; return setInternal(position, item); }
/** * set a new list of items and apply it to the existing list (clear - add) for this adapter * NOTE may consider using setNewList if the items list is a reference to the list which is used inside the adapter * * @param items the items to set */ public ModelAdapter<Model, Item> set(List<Model> items) { return set(items, true); }
/** * add a list of items at the given position within the existing items * * @param position the global position * @param list the items to add */ public ModelAdapter<Model, Item> add(int position, List<Model> list) { List<Item> items = intercept(list); return addInternal(position, items); }
/** * Remove a drawerItem by the identifier * * @param identifier */ public void removeItem(long identifier) { getItemAdapter().removeByIdentifier(identifier); }
/** * add a list of items to the end of the existing items * * @param items the items to add */ public FastAdapterDialog<Item> add(List<Item> items) { mItemAdapter.add(items); return this; }
/** * set a new list of items and apply it to the existing list (clear - add) for this adapter * * @param items the new items to set */ public FastAdapterBottomSheetDialog<Item> set(List<Item> items) { mItemAdapter.set(items); return this; }
/** * removes all items of this adapter */ public FastAdapterBottomSheetDialog<Item> clear() { mItemAdapter.clear(); return this; } }
/** * moves an item within the list from a position to a position * * @param fromPosition the position global from which we want to move * @param toPosition the global position to which to move * @return this */ public FastAdapterBottomSheetDialog<Item> move(int fromPosition, int toPosition) { mItemAdapter.move(fromPosition, toPosition); return this; }
/** * sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged * * @param items the new items to set */ public FastAdapterBottomSheetDialog<Item> setNewList(List<Item> items) { mItemAdapter.setNewList(items); return this; }
/** * add an item at the end of the existing items * * @param item the item to add */ public FastAdapterBottomSheetDialog<Item> add(Item item) { mItemAdapter.add(item); return this; }
/** * add an item at the given position within the existing icons * * @param position the global position * @param item the item to add */ public FastAdapterBottomSheetDialog<Item> add(int position, Item item) { mItemAdapter.add(position, item); return this; }