/* Copyright (c) 2002-2011 by XMLVM.org * * Project Info: http://www.xmlvm.org * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. */ package android.location; public class Location { private String provider; private double longitude = 0; private double latitude = 0; private double altitude = 0; private float accuracy = 0; private float bearing = 0; private float speed = 0; private boolean hasAltitude = false; private boolean hasSpeed = false; private boolean hasBearing = false; public Location(String provider) { this.provider = provider; } public boolean hasAltitude() { return hasAltitude; } public double getAltitude() { return altitude; } public void setAltitude(double altitude) { this.altitude = altitude; hasAltitude = true; } public boolean hasBearing() { return hasBearing; } public float getBearing() { return bearing; } public void setBearing(float bearing) { this.bearing = bearing; hasBearing = true; } public boolean hasSpeed() { return hasSpeed; } public float getSpeed() { return speed; } public void setSpeed(float speed) { this.speed = speed; hasSpeed = true; } public float getAccuracy() { return accuracy; } public void setAccuracy(float accuracy) { this.accuracy = accuracy; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLongitude() { return longitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public String getProvider() { return provider; } public void setProvider(String provider) { this.provider = provider; } }