diff --git a/app/src/main/ic_sun-web.png b/app/src/main/ic_sun-web.png new file mode 100644 index 0000000..9827301 --- /dev/null +++ b/app/src/main/ic_sun-web.png Binary files differ diff --git a/app/src/main/java/de/apps4ics/mountainnavigation/Poi.java b/app/src/main/java/de/apps4ics/mountainnavigation/Poi.java index 22b1118..3a14268 100644 --- a/app/src/main/java/de/apps4ics/mountainnavigation/Poi.java +++ b/app/src/main/java/de/apps4ics/mountainnavigation/Poi.java @@ -1,5 +1,7 @@ package de.apps4ics.mountainnavigation; +import org.osmdroid.api.Marker; + /** * Created by Vinz on 06.10.2015. */ @@ -12,6 +14,40 @@ private long _time; private int _ext_poi_id; + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Poi poi = (Poi) o; + + if (_id != poi._id) return false; + if (Double.compare(poi._lat, _lat) != 0) return false; + if (Double.compare(poi._lon, _lon) != 0) return false; + if (Double.compare(poi._alt, _alt) != 0) return false; + if (_type != poi._type) return false; + if (_time != poi._time) return false; + return _ext_poi_id == poi._ext_poi_id; + + } + + @Override + public int hashCode() { + int result; + long temp; + result = _id; + temp = Double.doubleToLongBits(_lat); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(_lon); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(_alt); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + result = 31 * result + _type; + result = 31 * result + (int) (_time ^ (_time >>> 32)); + result = 31 * result + _ext_poi_id; + return result; + } + public Poi(){ } @@ -47,6 +83,19 @@ return _id; } + @Override + public String toString() { + return "Poi{" + + "_id=" + _id + + ", _lat=" + _lat + + ", _lon=" + _lon + + ", _alt=" + _alt + + ", _type=" + _type + + ", _time=" + _time + + ", _ext_poi_id=" + _ext_poi_id + + '}'; + } + public double getLat(){ return _lat; }