diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java index 255f74c6e3..946833bfff 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java @@ -5,6 +5,7 @@ import android.text.TextUtils; import java.io.Serializable; import java.util.List; +import java.util.Objects; @SuppressWarnings("unused") public class MarkerExploreWay implements Serializable { @@ -137,7 +138,7 @@ public class MarkerExploreWay implements Serializable { } public String getPoiType() { - if ( TextUtils.isEmpty( poiType ) ) { + if (TextUtils.isEmpty(poiType)) { return MarkerPoiTypeEnum.FOURS_BLOCK_UP; } return poiType; @@ -155,6 +156,21 @@ public class MarkerExploreWay implements Serializable { this.uploadType = uploadType; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MarkerExploreWay that = (MarkerExploreWay) o; + return Objects.equals(infoId, that.infoId) && + Objects.equals(type, that.type) && + Objects.equals(poiType, that.poiType); + } + + @Override + public int hashCode() { + return Objects.hash(infoId, type, poiType); + } + @Override public String toString() { return "MarkerExploreWay{" +