nl.madline.opendp500
Class JDPPlaylist

java.lang.Object
  |
  +--nl.madline.opendp500.JDPPlaylist

public class JDPPlaylist
extends java.lang.Object

Author:
svmaris

Constructor Summary
JDPPlaylist(java.lang.String mediaType, java.lang.String name)
          Default constructor.
 
Method Summary
 void addFile(java.lang.String filename)
          Add a file to the playlist
 java.util.Vector getContents()
          Return a vector with the contents of the playlist
 java.lang.String[] getFiles()
          Get an array of String with all current files
 java.lang.String getMediaType()
          Return the media type of the playlist
 java.lang.String getName()
          Return the name of the playlist
 boolean isEmpty()
          Returns true if the playlist is empty
 void removeFile(int number)
          Remove a file from the playlist by it's number.
 void removeFile(java.lang.String filename)
          Remove a file from the playlist
 void setMediaType(java.lang.String currentMediaType)
          Set the current mediaType to a given value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDPPlaylist

public JDPPlaylist(java.lang.String mediaType,
                   java.lang.String name)
Default constructor.

Parameters:
mediaType - The media-type of this playlist (AUDIO/VIDEO/PICTURE)
name - The name of the playlist
Method Detail

addFile

public void addFile(java.lang.String filename)
Add a file to the playlist

Parameters:
filename - The file to be added

removeFile

public void removeFile(java.lang.String filename)
Remove a file from the playlist

Parameters:
filename - The file to be removed

getFiles

public java.lang.String[] getFiles()
Get an array of String with all current files

Returns:
files An array containing all the files in the playlist

isEmpty

public boolean isEmpty()
Returns true if the playlist is empty

Returns:
empty True if empty, false if not

getName

public java.lang.String getName()
Return the name of the playlist

Returns:
name The name of the playlist

getMediaType

public java.lang.String getMediaType()
Return the media type of the playlist

Returns:
mediaType The media type (AUDIO/VIDEO/PICTURE)

removeFile

public void removeFile(int number)
Remove a file from the playlist by it's number. First entry is '1'.

Parameters:
number - The number of the file that needs to be removed

getContents

public java.util.Vector getContents()
Return a vector with the contents of the playlist

Returns:
contents All files in the playlist as a Vector

setMediaType

public void setMediaType(java.lang.String currentMediaType)
Set the current mediaType to a given value

Parameters:
currentMediaType - The media type of the playlist