package vn.tiki.imagepicker.entity;

/**
 * Created by Giang Nguyen on 12/2/16.
 */

public class Image {

  private final String path;
  private final boolean selected;

  public Image(String path, boolean selected) {
    this.path = path;
    this.selected = selected;
  }

  public String getPath() {
    return path;
  }

  public boolean isSelected() {
    return selected;
  }

  @Override public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Image image = (Image) o;

    if (isSelected() != image.isSelected()) return false;
    return getPath() != null ? getPath().equals(image.getPath()) : image.getPath() == null;
  }

  @Override public int hashCode() {
    int result = getPath() != null ? getPath().hashCode() : 0;
    result = 31 * result + (isSelected() ? 1 : 0);
    return result;
  }

  @Override public String toString() {
    return "Image{" +
        "path='" + path + '\'' +
        ", selected=" + selected +
        '}';
  }
}

@@ -936,26 +936,24 @@
 %22Image%7B%22
- +
 %0A       
  %22path='
@@ -944,16 +944,18 @@
 %0A       
+ +
  %22path='
@@ -959,32 +959,46 @@
 h='%22
- + path
+%0A        + path%0A       
  + '%5C''
- +
 %0A       
  %22, 
@@ -993,16 +993,18 @@
 %0A       
+ +
  %22, sele
@@ -1009,16 +1009,24 @@
 lected=%22
+%0A       
  + selec
@@ -1032,18 +1032,16 @@
 cted
- +
 %0A       
  '%7D'
@@ -1036,16 +1036,18 @@
 %0A       
+ +
  '%7D';%0A  

fix check style