Lines Matching refs:item
60 * Returns the index for the first occurrence of item in the adapter, or -1 if
63 * @param item The item to find in the list.
64 * @return Index of the first occurrence of the item in the adapter, or -1
67 public int indexOf(Object item) {
68 return mItems.indexOf(item);
75 * @param positionStart The position of first item that has changed.
83 * Adds an item to the end of the adapter.
85 * @param item The item to add to the end of the adapter.
87 public void add(Object item) {
88 add(mItems.size(), item);
92 * Inserts an item into this adapter at the specified index.
95 * @param index The index at which the item should be inserted.
96 * @param item The item to insert into the adapter.
98 public void add(int index, Object item) {
99 mItems.add(index, item);
120 * Removes the first occurrence of the given item from the adapter.
122 * @param item The item to remove from the adapter.
123 * @return True if the item was found and thus removed from the adapter.
125 public boolean remove(Object item) {
126 int index = mItems.indexOf(item);
135 * Replaces item at position with a new item and calls notifyItemRangeChanged()
136 * at the given position. Note that this method does not compare new item to
137 * existing item.
138 * @param position The index of item to replace.
139 * @param item The new item to be placed at given position.
141 public void replace(int position, Object item) {
142 mItems.set(position, item);
150 * @param position The index of the first item to remove.