Android Open Source - Realtime-Port-Authority Line Info






From Project

Back to project page Realtime-Port-Authority.

License

The source code is released under:

Apache License

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;
//from w  w w  . java2 s  .  c o  m
import 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.
 */
public class LineInfo {
    private int stpid;
    private String stpnm;
    private String rtdir;
    private LatLng latLng;

    private boolean 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;
    }

    public void setStpid(String stpid) {
        setStpid(Integer.parseInt(stpid));
    }

    public void setStpid(int stpid) {
        this.stpid = stpid;
    }

    public void setStpnm(String stpnm) {
        this.stpnm = stpnm;
    }

    public void setRtdir(String rtdir) {
        this.rtdir = rtdir;
    }

    public void setLatLng(String lat, String lon) {
        setLatLng(Double.parseDouble(lat), Double.parseDouble(lon));
    }

    public void setLatLng(double lat, double lon) {
        latLng = new LatLng(lat, lon);
    }

    public int getStpid() {
        return stpid;
    }

    public String getStpnm() {
        return stpnm;
    }

    public String getRtdir() {
        return rtdir;
    }

    public LatLng getLatLng() {
        return latLng;
    }

    public boolean isBusStop() {
        return isBusStop;
    }



}




Java Source Code List

.Globals.java
.PortAuthorityRealtime.java
rectangledbmi.com.pittsburghrealtimetracker.AboutActivity.java
rectangledbmi.com.pittsburghrealtimetracker.ApplicationTest.java
rectangledbmi.com.pittsburghrealtimetracker.BusInformationDialog.java
rectangledbmi.com.pittsburghrealtimetracker.NavigationDrawerFragment.java
rectangledbmi.com.pittsburghrealtimetracker.SelectTransit.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.BusNotRunningException.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.BusSaxHandler.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.BusXMLPullParser.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.InputSave.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.PredictionsXMLPullParser.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestLine.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestPredictions.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestRoutes.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RequestTask.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.RouteSaxHandler.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.TransitSAXHandler.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.containers.ETAContainer.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.containers.RequestLineContainer.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.extend.CheckableRelativeLayout.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.extend.ColoredArrayAdapter.java
rectangledbmi.com.pittsburghrealtimetracker.handlers.extend.ETAWindowAdapter.java
rectangledbmi.com.pittsburghrealtimetracker.world.Bus.java
rectangledbmi.com.pittsburghrealtimetracker.world.LineInfo.java
rectangledbmi.com.pittsburghrealtimetracker.world.Prediction.java
rectangledbmi.com.pittsburghrealtimetracker.world.Route.java
rectangledbmi.com.pittsburghrealtimetracker.world.TransitStop.java