Skip to content

Instantly share code, notes, and snippets.

@benbaxter
Last active December 15, 2017 18:19
Show Gist options
  • Save benbaxter/95e60694d7c7ec193e36727c32abe650 to your computer and use it in GitHub Desktop.
Save benbaxter/95e60694d7c7ec193e36727c32abe650 to your computer and use it in GitHub Desktop.
public abstract class DiffCallback<Value> {
public abstract boolean areItemsTheSame(@NonNull Value oldItem,
@NonNull Value newItem);
public abstract boolean areContentsTheSame(@NonNull Value oldItem,
@NonNull Value newItem);
@SuppressWarnings("WeakerAccess")
public Object getChangePayload(@NonNull Value oldItem, @NonNull Value newItem) {
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment