@Test public void testEquals() { CultureItem firstItem = new CultureItem(); CultureItem secondItem = new CultureItem(); assertEquals(firstItem, secondItem); firstItem.setId(5); assertNotEquals(firstItem, secondItem); secondItem.setId(firstItem.getId()); assertEquals(firstItem, secondItem); secondItem.setDescription(""); assertNotEquals(firstItem, secondItem); firstItem.setDescription(secondItem.getDescription()); assertEquals(firstItem, secondItem); Tag t1 = new Tag("tag1"); ArrayList<Tag> firstTagList = new ArrayList<>(); firstTagList.add(t1); firstItem.setTagList(firstTagList); assertNotEquals(firstItem, secondItem); ArrayList<Tag> secondTagList = new ArrayList<>(); secondTagList.add(new Tag(t1.getName())); secondItem.setTagList(secondTagList); assertEquals(firstItem, secondItem); }
@Override public boolean equals(Object obj) { if (!(obj instanceof CultureItem)) { return false; } CultureItem other = (CultureItem)obj; return this.id == other.id && this.user == other.user && Utils.objectEquals(this.title, other.title) && Utils.objectEquals(this.description, other.description) && Utils.objectEquals(this.placeName, other.placeName) && Utils.objectEquals(this.startYear, other.startYear) && Utils.objectEquals(this.endYear, other.endYear) && Utils.objectEquals(this.latitude, other.latitude) && Utils.objectEquals(this.longitude, other.longitude) && Utils.objectEquals(this.imageList, other.imageList) && Utils.objectEquals(this.tagList, other.tagList) && Utils.objectEquals(this.commentList, other.commentList) && Utils.objectEquals(this.isFavorite, other.isFavorite) && Utils.objectEquals(this.favoriteCount, other.favoriteCount) && this.publicAccessibility == other.publicAccessibility && Utils.objectEquals(this.userInfo, other.userInfo); }
CultureItem implements Parcelable { @Override public boolean equals(Object obj) { if (!(obj instanceof CultureItem)) { return false; } CultureItem other = (CultureItem)obj; return this.id == other.id && this.user == other.user && Utils.objectEquals(this.title, other.title) && Utils.objectEquals(this.description, other.description) && Utils.objectEquals(this.placeName, other.placeName) && Utils.objectEquals(this.startYear, other.startYear) && Utils.objectEquals(this.endYear, other.endYear) && Utils.objectEquals(this.latitude, other.latitude) && Utils.objectEquals(this.longitude, other.longitude) && Utils.objectEquals(this.imageList, other.imageList) && Utils.objectEquals(this.tagList, other.tagList) && Utils.objectEquals(this.commentList, other.commentList) && Utils.objectEquals(this.isFavorite, other.isFavorite) && Utils.objectEquals(this.favoriteCount, other.favoriteCount) && this.publicAccessibility == other.publicAccessibility && Utils.objectEquals(this.userInfo, other.userInfo); } }
CultureItem implements Parcelable { @Override public boolean equals(Object obj) { if (!(obj instanceof CultureItem)) { return false; } CultureItem other = (CultureItem)obj; return this.id == other.id && this.user == other.user && Utils.objectEquals(this.title, other.title) && Utils.objectEquals(this.description, other.description) && Utils.objectEquals(this.placeName, other.placeName) && Utils.objectEquals(this.startYear, other.startYear) && Utils.objectEquals(this.endYear, other.endYear) && Utils.objectEquals(this.latitude, other.latitude) && Utils.objectEquals(this.longitude, other.longitude) && Utils.objectEquals(this.imageList, other.imageList) && Utils.objectEquals(this.tagList, other.tagList) && Utils.objectEquals(this.commentList, other.commentList) && Utils.objectEquals(this.isFavorite, other.isFavorite) && Utils.objectEquals(this.favoriteCount, other.favoriteCount) && this.publicAccessibility == other.publicAccessibility && Utils.objectEquals(this.userInfo, other.userInfo); } CultureItem(); @SuppressWarnings("unchecked")  CultureItem(Parcel in); }
CultureItem implements Parcelable { @Override public boolean equals(Object obj) { if (!(obj instanceof CultureItem)) { return false; } CultureItem other = (CultureItem)obj; return this.id == other.id && this.user == other.user && Utils.objectEquals(this.title, other.title) && Utils.objectEquals(this.description, other.description) && Utils.objectEquals(this.placeName, other.placeName) && Utils.objectEquals(this.startYear, other.startYear) && Utils.objectEquals(this.endYear, other.endYear) && Utils.objectEquals(this.latitude, other.latitude) && Utils.objectEquals(this.longitude, other.longitude) && Utils.objectEquals(this.imageList, other.imageList) && Utils.objectEquals(this.tagList, other.tagList) && Utils.objectEquals(this.commentList, other.commentList) && Utils.objectEquals(this.isFavorite, other.isFavorite) && Utils.objectEquals(this.favoriteCount, other.favoriteCount) && this.publicAccessibility == other.publicAccessibility && Utils.objectEquals(this.userInfo, other.userInfo); } CultureItem(); @SuppressWarnings("unchecked")  CultureItem(Parcel in); @Override void writeToParcel(Parcel out, int flags); @Override int describeContents(); long getId(); void setId(long id); long getUser(); void setUser(long user); String getTitle(); void setTitle(String title); String getDescription(); void setDescription(String description); String getPlaceName(); void setPlaceName(String placeName); Integer getStartYear(); void setStartYear(int startYear); Integer getEndYear(); void setEndYear(int endYear); void setStartYear(Integer startYear); void setEndYear(Integer endYear); String getLatitude(); void setLatitude(String latitude); String getLongitude(); void setLongitude(String longitude); boolean isPublicAccessibility(); void setPublicAccessibility(boolean publicAccessibility); boolean isFavorite(); void setFavorite(boolean favorite); ArrayList<Image> getImageList(); void setImageList(ArrayList<Image> imageList); ArrayList<Tag> getTagList(); void setTagList(ArrayList<Tag> tagList); Boolean getPublicAccessibility(); void setPublicAccessibility(Boolean publicAccessibility); String getFavoriteCount(); void setFavoriteCount(String favoriteCount); UserResponse getUserInfo(); void setUserInfo(UserResponse userInfo); FeedRow toFeedRow(); ArrayList<Comment> getCommentList(); void setCommentList(ArrayList<Comment> commentList); @Override boolean equals(Object obj); }
CultureItem implements Parcelable { @Override public boolean equals(Object obj) { if (!(obj instanceof CultureItem)) { return false; } CultureItem other = (CultureItem)obj; return this.id == other.id && this.user == other.user && Utils.objectEquals(this.title, other.title) && Utils.objectEquals(this.description, other.description) && Utils.objectEquals(this.placeName, other.placeName) && Utils.objectEquals(this.startYear, other.startYear) && Utils.objectEquals(this.endYear, other.endYear) && Utils.objectEquals(this.latitude, other.latitude) && Utils.objectEquals(this.longitude, other.longitude) && Utils.objectEquals(this.imageList, other.imageList) && Utils.objectEquals(this.tagList, other.tagList) && Utils.objectEquals(this.commentList, other.commentList) && Utils.objectEquals(this.isFavorite, other.isFavorite) && Utils.objectEquals(this.favoriteCount, other.favoriteCount) && this.publicAccessibility == other.publicAccessibility && Utils.objectEquals(this.userInfo, other.userInfo); } CultureItem(); @SuppressWarnings("unchecked")  CultureItem(Parcel in); @Override void writeToParcel(Parcel out, int flags); @Override int describeContents(); long getId(); void setId(long id); long getUser(); void setUser(long user); String getTitle(); void setTitle(String title); String getDescription(); void setDescription(String description); String getPlaceName(); void setPlaceName(String placeName); Integer getStartYear(); void setStartYear(int startYear); Integer getEndYear(); void setEndYear(int endYear); void setStartYear(Integer startYear); void setEndYear(Integer endYear); String getLatitude(); void setLatitude(String latitude); String getLongitude(); void setLongitude(String longitude); boolean isPublicAccessibility(); void setPublicAccessibility(boolean publicAccessibility); boolean isFavorite(); void setFavorite(boolean favorite); ArrayList<Image> getImageList(); void setImageList(ArrayList<Image> imageList); ArrayList<Tag> getTagList(); void setTagList(ArrayList<Tag> tagList); Boolean getPublicAccessibility(); void setPublicAccessibility(Boolean publicAccessibility); String getFavoriteCount(); void setFavoriteCount(String favoriteCount); UserResponse getUserInfo(); void setUserInfo(UserResponse userInfo); FeedRow toFeedRow(); ArrayList<Comment> getCommentList(); void setCommentList(ArrayList<Comment> commentList); @Override boolean equals(Object obj); @SerializedName("public_accessibility")
    @Expose
    private boolean publicAccessibility; static final Parcelable.Creator<CultureItem> CREATOR; }