Android Open Source - andrioidaudiostream Stream Station






From Project

Back to project page andrioidaudiostream.

License

The source code is released under:

GNU General Public License

If you think the Android project andrioidaudiostream 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 com.speakingcode.android.media.mediaplayer;
/*  w w w .  ja  va  2s.  c  o  m*/
/**
 * A class to represent Streaming media stations. Holds label, URL, and other information.
 */
public class StreamStation {
    private String mStationLabel;
    private String mStationUrl;

    /**
     * Constructs a new StreamStation object with empty label and URL
     */
    public StreamStation() {
        this("", "");
    }

    /**
     * Constructs a new StreamStation object with specified label and URL
     *
     * @param stationLabel
     * @param stationUrl
     */
    public StreamStation(String stationLabel, String stationUrl) {
        mStationLabel = stationLabel;
        mStationUrl = stationUrl;
    }


    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        StreamStation other = (StreamStation) obj;
        if (mStationLabel == null) {
            if (other.mStationLabel != null)
                return false;
        } else if (!mStationLabel.equals(other.mStationLabel))
            return false;
        if (mStationUrl == null) {
            if (other.mStationUrl != null)
                return false;
        } else if (!mStationUrl.equals(other.mStationUrl))
            return false;
        return true;
    }

    /**
     * Gets the station's label as a String
     *
     * @return the station label
     */
    public String getStationLabel() {
        return mStationLabel;
    }

    /**
     * Gets the station's URL, as a String
     *
     * @return the URL of the station
     */
    public String getStationUrl() {
        return mStationUrl;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((mStationLabel == null) ? 0 : mStationLabel.hashCode());
        result = prime * result
                + ((mStationUrl == null) ? 0 : mStationUrl.hashCode());
        return result;
    }

    /**
     * Sets a String as the station's label
     *
     * @param stationLabel the label to set
     */
    public void setStationLabel(String stationLabel) {
        this.mStationLabel = stationLabel;
    }

    /**
     * Set's a String as the station's URL
     *
     * @param stationUrl the URL of the Station
     */
    public void setStationUrl(String stationUrl) {
        this.mStationUrl = mStationUrl;
    }


}




Java Source Code List

com.speakingcode.android.media.mediaplayer.IMediaPlayerServiceClient.java
com.speakingcode.android.media.mediaplayer.IMediaPlayerThreadClient.java
com.speakingcode.android.media.mediaplayer.MediaPlayerService.java
com.speakingcode.android.media.mediaplayer.MediaPlayerThread.java
com.speakingcode.android.media.mediaplayer.StatefulMediaPlayer.java
com.speakingcode.android.media.mediaplayer.StreamStationSpinnerAdapter.java
com.speakingcode.android.media.mediaplayer.StreamStation.java
com.speakingcode.audiostream.ApplicationTest.java
com.speakingcode.audiostream.CONSTANTS.java
com.speakingcode.audiostream.MainActivity.java