private void addPokemonToFavs(PokeModel pokeModel,ArrayList<Integer> listOfFavPokemon){
  if (pokeModel != null && listOfFavPokemon != null) {
    int pokeNum=pokeModel.getPokedexNum();
    if (listOfFavPokemon.contains(pokeNum)) {
      TypefaceUtils.displayToast(mContext,getString(R.string.redundant_fav_pokemon_msg),TypefaceUtils.TOAST_SHORT_DURATION);
    }
 else {
      PokeCursorManager.insertPokemonInDb(mContext,pokeNum,PokeDBContract.FavoritePokemonEntry.TABLE_NAME,PokeDBContract.FavoritePokemonEntry.COLUMN_NUMBER);
      TypefaceUtils.displayToast(mContext,getString(R.string.add_pokemon_to_favs_msg),TypefaceUtils.TOAST_SHORT_DURATION);
    }
  }
}

private void addPokemonToFavs ( PokeModel pokeModel , ArrayList < Integer > listOfFavPokemon ) { if ( pokeModel != null && listOfFavPokemon != null ) { int pokeNum = pokeModel . getPokedexNum ( ) ; if ( listOfFavPokemon . contains ( pokeNum ) ) { TypefaceUtils . displayToast ( mContext , getString ( R . string . redundant_fav_pokemon_msg ) , TypefaceUtils . TOAST_SHORT_DURATION ) ; } else { PokeCursorManager . insertPokemonInDb ( mContext , pokeNum , PokeDBContract . FavoritePokemonEntry . TABLE_NAME , PokeDBContract . FavoritePokemonEntry . COLUMN_NUMBER ) ; TypefaceUtils . displayToast ( mContext , getString ( R . string . add_pokemon_to_favs_msg ) , TypefaceUtils . TOAST_SHORT_DURATION ) ; } } }
adds the pokemon to favorites if applicable and displays a message to the user .
