If you think the Android project Realtime-Port-Authority listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package rectangledbmi.com.pittsburghrealtimetracker.world;
//fromwww.java2s.comimport com.google.android.gms.maps.model.LatLng;
/**
* This is the object to wrap the minimal bus stop stuff...
*
* Created by epicstar on 12/7/14.
*/publicclass LineInfo {
privateint stpid;
private String stpnm;
private String rtdir;
private LatLng latLng;
privateboolean isBusStop;
/**
* Primary constructor that sets the stpid, stpnm, lat, and lon as strings
* @param stpid the stop id
* @param stpnm the stop name
* @param rtdir the route direction
* @param lat the latitude of the stop
* @param lon the longitude of the stop
*/public LineInfo(String stpid, String stpnm, String rtdir, double lat, double lon) {
setStpid(stpid);
setStpnm(stpnm);
setRtdir(rtdir);
setLatLng(lat, lon);
isBusStop = true;
}
public LineInfo(LatLng latLng) {
this.latLng = latLng;
isBusStop = false;
}
public LineInfo(double lat, double lon) {
setLatLng(lat, lon);
isBusStop = false;
}
publicvoid setStpid(String stpid) {
setStpid(Integer.parseInt(stpid));
}
publicvoid setStpid(int stpid) {
this.stpid = stpid;
}
publicvoid setStpnm(String stpnm) {
this.stpnm = stpnm;
}
publicvoid setRtdir(String rtdir) {
this.rtdir = rtdir;
}
publicvoid setLatLng(String lat, String lon) {
setLatLng(Double.parseDouble(lat), Double.parseDouble(lon));
}
publicvoid setLatLng(double lat, double lon) {
latLng = new LatLng(lat, lon);
}
publicint getStpid() {
return stpid;
}
public String getStpnm() {
return stpnm;
}
public String getRtdir() {
return rtdir;
}
public LatLng getLatLng() {
return latLng;
}
publicboolean isBusStop() {
return isBusStop;
}
}