com.breeweb.slimconnect.data
Class Playlist

java.lang.Object
  extended bycom.breeweb.slimconnect.data.Playlist

public class Playlist
extends java.lang.Object

Class to represent a playlist within the Squeezebox server.

Author:
Bas de Bree

Constructor Summary
Playlist(Song[] songs, int currentTrack)
          contruct a new playlist object, with an array of songs and a currently playing track.
 
Method Summary
 boolean equals(java.lang.Object aObject)
           
 Song getCurrentSong()
          returns the current song, if the playlist is empty or the current song is incorrect, This method will return null.
 int getCurrentTrack()
          Returns the current track playing, note this is mostly the track playing at the moment the playlist was requested.
 Song[] getSongs()
          Returns the Songs in this playlist
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Playlist

public Playlist(Song[] songs,
                int currentTrack)
contruct a new playlist object, with an array of songs and a currently playing track.

Parameters:
songs - an array of Song objects.
currentTrack - the song which is currently playing.
See Also:
Song
Method Detail

getCurrentSong

public Song getCurrentSong()
returns the current song, if the playlist is empty or the current song is incorrect, This method will return null.

Returns:
the current song

getCurrentTrack

public int getCurrentTrack()
Returns the current track playing, note this is mostly the track playing at the moment the playlist was requested.

Returns:
the current track playing.

getSongs

public Song[] getSongs()
Returns the Songs in this playlist

Returns:
the Songs in this playlist
See Also:
Song

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object aObject)