toggle menu
KAHelpers
androidJvm
switch theme
search in API
recyclerview
/
dev.funkymuse.recyclerview
/
GenericDiffUtil
Generic
Diff
Util
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
Members
Constructors
Generic
Diff
Util
Link copied to clipboard
constructor
(
areItemsTheSameCallback
:
(
old
:
T
,
new
:
T
)
->
Boolean
?
,
areContentsTheSameCallback
:
(
old
:
T
,
new
:
T
)
->
Boolean
?
)
Functions
are
Contents
The
Same
Link copied to clipboard
open
override
fun
areContentsTheSame
(
oldItem
:
T
&
Any
,
newItem
:
T
&
Any
)
:
Boolean
are
Items
The
Same
Link copied to clipboard
open
override
fun
areItemsTheSame
(
oldItem
:
T
&
Any
,
newItem
:
T
&
Any
)
:
Boolean
get
Change
Payload
Link copied to clipboard
@
Nullable
open
fun
getChangePayload
(
@
NonNull
p0
:
T
&
Any
,
@
NonNull
p1
:
T
&
Any
)
:
Any
?