Lines Matching refs:item
58 * Returns the index for the first occurrence of item in the adapter, or -1 if
61 * @param item The item to find in the list.
62 * @return Index of the first occurrence of the item in the adapter, or -1
65 public int indexOf(Object item) {
66 return mItems.indexOf(item);
73 * @param positionStart The position of first item that has changed.
81 * Adds an item to the end of the adapter.
83 * @param item The item to add to the end of the adapter.
85 public void add(Object item) {
86 add(mItems.size(), item);
90 * Inserts an item into this adapter at the specified index.
93 * @param index The index at which the item should be inserted.
94 * @param item The item to insert into the adapter.
96 public void add(int index, Object item) {
97 mItems.add(index, item);
118 * Removes the first occurrence of the given item from the adapter.
120 * @param item The item to remove from the adapter.
121 * @return True if the item was found and thus removed from the adapter.
123 public boolean remove(Object item) {
124 int index = mItems.indexOf(item);
133 * Replaces item at position with a new item and calls notifyItemRangeChanged()
134 * at the given position. Note that this method does not compare new item to
135 * existing item.
136 * @param position The index of item to replace.
137 * @param item The new item to be placed at given position.
139 public void replace(int position, Object item) {
140 mItems.set(position, item);
148 * @param position The index of the first item to remove.