public class PlayList
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.io.File |
file |
private java.util.Vector<java.lang.String> |
songs |
Constructor and Description |
---|
PlayList(java.io.File file) |
PlayList(java.lang.String fileName) |
Modifier and Type | Method and Description |
---|---|
boolean |
addSong(java.lang.String song)
adds a song to the playlist
|
void |
setSongs(java.lang.Object[] sar)
set the contents of an object array as playlist
|
void |
writeToFile()
write this playlist to the file specified in the constructor
|
public PlayList(java.lang.String fileName)
public PlayList(java.io.File file)
public boolean addSong(java.lang.String song)
song
- - song to addpublic void setSongs(java.lang.Object[] sar)
sar
- - object array to be set as playlist (and casted to strings)public void writeToFile()