]> Softwares of Agnibho - solarcompass.git/blob - solarcompass/src/main/java/com/agnibho/android/solarcompass/LocationData.java
Initial commit
[solarcompass.git] / solarcompass / src / main / java / com / agnibho / android / solarcompass / LocationData.java
1 /**********************************************************************
2 * Title: Solar Compass
3 * Description: Android app for finding directions using the sun
4 * Author: Agnibho Mondal
5 * Website: http://code.agnibho.com/solarcompass
6 **********************************************************************
7 Copyright (c) 2016 Agnibho Mondal
8 All rights reserved
9 **********************************************************************
10 This file is part of Solar Compass.
11
12 Solar Compass is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 Solar Compass is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with Solar Compass. If not, see <http://www.gnu.org/licenses/>.
24 **********************************************************************/
25
26 package com.agnibho.android.solarcompass;
27
28 public class LocationData {
29 private static LocationData ourInstance = new LocationData();
30
31 public static LocationData getInstance() {
32 return ourInstance;
33 }
34
35 private LocationData() {
36 }
37
38 private double latitude;
39 private double longitude;
40 private boolean available=false;
41
42 protected void setCoordinate(double lat, double lon){
43 latitude=lat;
44 longitude=lon;
45 available=true;
46 }
47 protected double getLatitude(){
48 return latitude;
49 }
50 protected double getLongitude(){
51 return longitude;
52 }
53 protected boolean isAvailable() { return available; }
54 }