File Source: MediaSourceState.java

     1  /*
     2   * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
     3   *
     4   * Permission is hereby granted, free of charge, to any person obtaining a copy
     5   * of this software and associated documentation files (the "Software"), to deal
     6   * in the Software without restriction, including without limitation the rights
     7   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     8   * copies of the Software, and to permit persons to whom the Software is
     9   * furnished to do so, subject to the following conditions:
    10   *
    11   * The above copyright notice and this permission notice shall be included in
    12   * all copies or substantial portions of the Software.
    13   *
    14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    20   * SOFTWARE.
    21   */
    22  
    23  package com.dmdirc.addons.nowplaying;
    24  
    25  /**
    26   * The state of a media source.
    27   *
    28   * @author Shane McCormack
    29   * @since 0.6.3m1
    30   */
         /* 
    P/P   *  Method: MediaSourceState valueOf(String)
          * 
          *  Postconditions:
          *    init'ed(return_value)
          */
    31  public enum MediaSourceState {
    32  	/** Media Source is closed. */
        	 /* 
    P/P 	  *  Method: com.dmdirc.addons.nowplaying.MediaSourceState__static_init
        	  * 
        	  *  Postconditions:
        	  *    $VALUES == &new MediaSourceState[](MediaSourceState__static_init#6)
        	  *    CLOSED == &new MediaSourceState(MediaSourceState__static_init#1)
        	  *    $VALUES[0] == &new MediaSourceState(MediaSourceState__static_init#1)
        	  *    NOTKNOWN == &new MediaSourceState(MediaSourceState__static_init#5)
        	  *    $VALUES[4] == &new MediaSourceState(MediaSourceState__static_init#5)
        	  *    PAUSED == &new MediaSourceState(MediaSourceState__static_init#3)
        	  *    $VALUES[2] == &new MediaSourceState(MediaSourceState__static_init#3)
        	  *    PLAYING == &new MediaSourceState(MediaSourceState__static_init#4)
        	  *    $VALUES[3] == &new MediaSourceState(MediaSourceState__static_init#4)
        	  *    STOPPED == &new MediaSourceState(MediaSourceState__static_init#2)
        	  *    ...
        	  */
    33  	CLOSED ("Closed"),
    34  	/** Media Source is stopped. */
    35  	STOPPED ("Stopped"),
    36  	/** Media Source is paused. */
    37  	PAUSED ("Paused"),
    38  	/** Media Source is playing. */
    39  	PLAYING ("Playing"),
    40  	/** Media Source is giving an unknown state. */
    41  	NOTKNOWN ("Unknown");
    42  	
    43  	/** Nice name for this state. */
    44  	final String niceName;
    45  	
    46  	/**
    47  	 * Create a new MediaSourceState
    48  	 *
    49  	 * @param niceName Nice name for this state.
    50  	 */
        	 /* 
    P/P 	  *  Method: void com.dmdirc.addons.nowplaying.MediaSourceState(String, int, String)
        	  * 
        	  *  Postconditions:
        	  *    this.niceName == niceName
        	  *    init'ed(this.niceName)
        	  */
    51  	MediaSourceState(final String niceName) {
    52  		this.niceName = niceName;
    53  	}
    54  	
    55  	/**
    56  	 * Get the nice name for this state.
    57       *
    58       * @return This state's nice name
    59  	 */
    60  	public String getNiceName() {
        		 /* 
    P/P 		  *  Method: String getNiceName()
        		  * 
        		  *  Postconditions:
        		  *    return_value == this.niceName
        		  *    init'ed(return_value)
        		  */
    61  		return niceName;
    62  	}
    63  }








SofCheck Inspector Build Version : 2.17854
MediaSourceState.java 2009-Jun-25 01:54:24
MediaSourceState.class 2009-Sep-02 17:04:15