-
- All Implemented Interfaces:
public final class SimpleDiffCallback extends DiffCallback<Any>
-
-
Constructor Summary
Constructors Constructor Description SimpleDiffCallback()
-
Method Summary
Modifier and Type Method Description BooleanareItemsTheSame(Object oldItem, Object newItem)Called to decide whether two objects represent the same item. BooleanareContentsTheSame(Object oldItem, Object newItem)Called to decide whether two items have the same data. -
-
Method Detail
-
areItemsTheSame
Boolean areItemsTheSame(Object oldItem, Object newItem)
Called to decide whether two objects represent the same item.
- Parameters:
oldItem- The item in the old list.newItem- The item in the new list.
-
areContentsTheSame
Boolean areContentsTheSame(Object oldItem, Object newItem)
Called to decide whether two items have the same data. This information is used to detect if the contents of an item have changed.
- Parameters:
oldItem- The item in the old list.newItem- The item in the new list.
-
-
-
-