GenericDiffUtil

class GenericDiffUtil<T>(areItemsTheSameCallback: (old: T, new: T) -> Boolean?, areContentsTheSameCallback: (old: T, new: T) -> Boolean?) : DiffUtil.ItemCallback<T>

Use T as data class preferably if you don't pass anything in constructors

Parameters

T

Constructors

Link copied to clipboard
constructor(areItemsTheSameCallback: (old: T, new: T) -> Boolean?, areContentsTheSameCallback: (old: T, new: T) -> Boolean?)

Functions

Link copied to clipboard
open override fun areContentsTheSame(oldItem: T & Any, newItem: T & Any): Boolean
Link copied to clipboard
open override fun areItemsTheSame(oldItem: T & Any, newItem: T & Any): Boolean
Link copied to clipboard
open fun getChangePayload(@NonNull p0: T & Any, @NonNull p1: T & Any): Any?