Back to project page GPA.
The source code is released under:
Apache License
If you think the Android project GPA listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.bishal.android.taskmanager.tasks; /* ww w .j ava2s. c o m*/ import java.io.Serializable; import android.location.Address; public class Task implements Serializable { /** * Generated by Eclipse */ private static final long serialVersionUID = 5527258407135652423L; private long id; private String name; private boolean complete; private String address; private double latitude; private double longitude; public Task(String taskName) { name = taskName; } public void setId(long id) { this.id = id; } public long getId() { return id; } public void setName(String name) { this.name = name; } public String getName() { return name; } public void setComplete(boolean complete) { this.complete = complete; } public boolean isComplete() { return complete; } public void setAddress(String address) { this.address = address; } /* public void setTime(String time){ this.time=time; } */ public String getAddress() { return address; } public boolean hasAddress() { return null != address; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLatitude() { return latitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public double getLongitude() { return longitude; } public void toggleComplete() { complete = !complete; } public String toString() { return name; } public void setAddress(Address a) { if (null == a) { address = null; latitude = longitude = 0; } else { int maxAddressLine = a.getMaxAddressLineIndex(); StringBuffer sb = new StringBuffer(""); for (int i=0; i<maxAddressLine; i++) { sb.append(a.getAddressLine(i) + " "); } address = sb.toString(); latitude = a.getLatitude(); longitude = a.getLongitude(); } } public boolean hasLocation() { return (latitude != 0 && longitude != 0); } }