/**
* This file is part of MountainNavigation.
*
* MountainNavigation is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MountainNavigation is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MountainNavigation. If not, see <http://www.gnu.org/licenses/>.
*
* @copyright Copyright (c) 2016 Vinzenz Rosenkanz <vinzenz.rosenkranz@gmail.com>
*
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
*/
package de.apps4ics.mountainnavigation;
import android.location.Location;
import org.osmdroid.util.GeoPoint;
public class HikePoint {
private long timestamp;
private GeoPoint location;
public HikePoint(Location location, long timestamp) {
this(new GeoPoint(location.getLatitude(), location.getLongitude(), location.getAltitude()), timestamp);
}
public HikePoint(GeoPoint geoPoint, long timestamp) {
this.location = geoPoint;
this.timestamp = timestamp;
}
public HikePoint(GeoPoint geoPoint) {
this(geoPoint, System.currentTimeMillis());
}
public HikePoint(Location location) {
this(new GeoPoint(location.getLatitude(), location.getLongitude(), location.getAltitude()));
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public GeoPoint getLocation() {
return location;
}
public void setLocation(GeoPoint location) {
this.location = location;
}
}