package com.nikita.recipiesapp.common.models;


import java.util.List;

public final class Recipe {
  public final int id;
  public final String name;
  public final List<Ingredient> ingredients;
  public final List<Step> steps;
  public final int servings;
  private final String image;

  public Recipe(int id,
                String name,
                List<Ingredient> ingredients,
                List<Step> steps,
                int servings,
                String image) {
    this.id = id;
    this.name = name;
    this.ingredients = ingredients;
    this.steps = steps;
    this.servings = servings;
    this.image = image;
  }

  public String getImageUri() {
    return (image != null && !image.isEmpty()) ? image : "https://i0.wp.com/bakingamoment.com/wp-content/uploads/2015/03/4255featured2.jpg?w=720";
  }

  @Override
  public String toString() {
    return "{" +
      "id:" + id +
      "name:" + name +
      "ingredients:" + ingredients +
      "steps:" + steps +
      "servings:" + servings +
      "image:" + image +
      "}";
  }
}

@@ -672,22 +672,18 @@
 ) %7B%0A    
-return
+if
  (image 
@@ -715,17 +715,84 @@
 ()) 
-? image :
+return image;%0A%0A    String url;%0A    switch (id) %7B%0A      case 1:%0A        url =
  %22ht
@@ -878,16 +878,542 @@
 w=720%22;%0A
+        break;%0A      case 2:%0A        url = %22https://d2gk7xgygi98cy.cloudfront.net/4-3-large.jpg%22;%0A        break;%0A      case 3:%0A        url = %22https://dessertswithbenefits.com/wp-content/uploads/2014/01/33.jpg%22;%0A        break;%0A      case 4:%0A        url = %22http://img.taste.com.au/3kqM4rqu/w720-h480-cfill-q80/taste/2016/11/classic-baked-vanilla-cheesecake-53202-1.jpeg%22;%0A        break;%0A      default:%0A        url = %22http://img.taste.com.au/BcemwIdD/taste/2016/11/chocolate-celebration-cake-85607-1.jpeg%22;%0A    %7D%0A    return url;%0A
   %7D%0A%0A  @

Add different images for recipes