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