* with {@link PlaylistSupport}
*
* @return Playlist object
*/
public final Playlist toPlaylist() {
Playlist p = new Playlist();
p.setName(getTitle());
p.setAuthor(getCreator());
JsArray<Track> ts = getTracks();
for (int i = 0; i < ts.length(); i++) {
Track t = ts.get(i);
MRL m = new MRL(t.getTitle(), t.getCreator());
JsArrayString js = t.getLocation();
for (int j = 0; j < js.length(); j++) {
m.addURL(js.get(j));
}
p.add(m);
}
return p;
}