Home
last modified time | relevance | path

Searched refs:newItem (Results 1 – 6 of 6) sorted by relevance

/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/util/
DDiffUtilTest.java274 assertThat(applied.get(4).newItem, is(true)); in testDisableMoveDetection()
349 if (after.get(i).newItem) { in assertEquals()
350 assertThat(report, item.newItem, is(true)); in assertEquals()
352 assertThat(report, item.newItem, is(false)); in assertEquals()
393 assertThat(existing.newItem, is(false)); in applyUpdates()
418 if (existing.newItem) { in update()
433 if (existing.newItem) { in updateWithPayload()
454 final boolean newItem; field in DiffUtilTest.Item
460 public Item(boolean newItem) { in Item() argument
462 this.newItem = newItem; in Item()
[all …]
DSortedListTest.java100 public boolean areContentsTheSame(Item oldItem, Item newItem) { in setUp()
101 return oldItem.cmpField == newItem.cmpField && oldItem.data == newItem.data; in setUp()
223 Item newItem = new Item(item.id, item.cmpField); in testRandom() local
224 log.append("update ").append(item).append(" to ").append(newItem) in testRandom()
226 while (newItem.data == item.data) { in testRandom()
227 newItem.data = random.nextInt(1000); in testRandom()
229 int itemIndex = mList.add(newItem); in testRandom()
231 copy.add(newItem); in testRandom()
232 assertSame(mList.get(itemIndex), newItem); in testRandom() local
240 Item newItem = new Item(item.id, random.nextInt()); in testRandom() local
[all …]
/frameworks/support/v7/recyclerview/src/android/support/v7/util/
DSortedList.java304 T newItem = newData[newDataStart]; in merge() local
305 int compare = mCallback.compare(oldItem, newItem); in merge()
308 mData[mMergedSize++] = newItem; in merge()
312 } else if (compare == 0 && mCallback.areItemsTheSame(oldItem, newItem)) { in merge()
314 mData[mMergedSize++] = newItem; in merge()
317 if (!mCallback.areContentsTheSame(oldItem, newItem)) { in merge()
731 abstract public boolean areContentsTheSame(T2 oldItem, T2 newItem); in areContentsTheSame() argument
804 public boolean areContentsTheSame(T2 oldItem, T2 newItem) { in areContentsTheSame() argument
805 return mWrappedCallback.areContentsTheSame(oldItem, newItem); in areContentsTheSame()
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/util/
DSortedListActivity.java99 Item newItem) { in SortedListAdapter()
100 return oldItem.mText.equals(newItem.mText); in SortedListAdapter()
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/widget/
DOpReorderTest.java388 final Item newItem = Item.create(); in apply() local
389 mAddedItems.add(newItem); in apply()
390 items.add(op.positionStart + i, newItem); in apply()
/frameworks/base/services/core/java/com/android/server/job/
DJobSchedulerService.java484 static <T> void addOrderedItem(ArrayList<T> array, T newItem, Comparator<T> comparator) { in addOrderedItem() argument
485 int where = Collections.binarySearch(array, newItem, comparator); in addOrderedItem()
489 array.add(where, newItem); in addOrderedItem()