Created
September 27, 2017 13:55
-
-
Save husaynhakeem/f16af0ab99907974be1683fd2a5ed6c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final DiffCallback<Pokemon> DIFF_CALLBACK = new DiffCallback<Pokemon>() { | |
@Override | |
public boolean areItemsTheSame(@NonNull Pokemon oldPokemon, @NonNull Pokemon newPokemon) { | |
return oldPokemon.id == newPokemon.id; | |
} | |
@Override | |
public boolean areContentsTheSame(@NonNull Pokemon oldPokemon, @NonNull Pokemon newPokemon) { | |
return oldPokemon.name.equals(newPokemon.name); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment